Odd query result

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Odd query result

Eduardo Zenaide
hi all,

i'm experiencing something odd here.
i have a soil layer with some IDs. its dbf is something like:

leg_solos

PVA
PA
RL
SX
RL
RY
RR
...

when i do the query, using ROSA i click in a RL polygon. it returns:

SX
RR
RL
PA
PA
PVA
PVA
RY
RY

any other polygon returns same results - only changes the one in query and, sometimes, PAs appear above. like:

SX
RR
PA
PA
SX
PVA
PVA
RY
RY

(when querying SX polygon)

here a visual example: http://www.uep.cnps.embrapa.br/imagens/queryexemplo.jpg

my map file (its really big, so i'm just sending relevant layer and classes):

LAYER
    NAME Solos_AL
    METADATA
        "DESCRIPTION" "Solos"
        "RESULT_FIELDS" "Leg_solos"
        "RESULT_HEADERS" "Código"
    END
    LABELITEM "Leg_solos"
    LABELCACHE ON
    TYPE POLYGON
    STATUS OFF
    DATA Solos_AL
    CLASSITEM "Leg_solos"
    TOLERANCE 0
    TOLERANCEUNITS pixels
    CLASS
        NAME "PA"
        EXPRESSION "PA"
        STYLE
              COLOR 253 241 240
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "PVA"
        EXPRESSION "PVA"
        STYLE
              COLOR 249 210 205
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "RL"
        EXPRESSION "RL"
        STYLE
              COLOR 150 149 149
              OUTLINECOLOR 0 0 0         
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
         NAME "RY"
         EXPRESSION "RY"
          STYLE
              COLOR 238 235 220
              OUTLINECOLOR 0 0 0
          END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
          TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "RR"
          EXPRESSION "RR"
        STYLE
              COLOR 207 206 206
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "SX"
        EXPRESSION "SX"
        STYLE
              COLOR 181 214 174
              OUTLINECOLOR 0 0 0         
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
END # layer Solos_final_dd

########################

any thoughts?

thanks :)


--
Eduardo Zenaide
Reply | Threaded
Open this post in threaded view
|

Re: Odd query result

Eduardo Zenaide
nobody? :(

2007/8/24, Eduardo Zenaide <[hidden email]>:
hi all,

i'm experiencing something odd here.
i have a soil layer with some IDs. its dbf is something like:

leg_solos

PVA
PA
RL
SX
RL
RY
RR
...

when i do the query, using ROSA i click in a RL polygon. it returns:

SX
RR
RL
PA
PA
PVA
PVA
RY
RY

any other polygon returns same results - only changes the one in query and, sometimes, PAs appear above. like:

SX
RR
PA
PA
SX
PVA
PVA
RY
RY

(when querying SX polygon)

here a visual example: <a href="http://www.uep.cnps.embrapa.br/imagens/queryexemplo.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.uep.cnps.embrapa.br/imagens/queryexemplo.jpg

my map file (its really big, so i'm just sending relevant layer and classes):

LAYER
    NAME Solos_AL
    METADATA
        "DESCRIPTION" "Solos"
        "RESULT_FIELDS" "Leg_solos"
        "RESULT_HEADERS" "Código"
    END
    LABELITEM "Leg_solos"
    LABELCACHE ON
    TYPE POLYGON
    STATUS OFF
    DATA Solos_AL
    CLASSITEM "Leg_solos"
    TOLERANCE 0
    TOLERANCEUNITS pixels
    CLASS
        NAME "PA"
        EXPRESSION "PA"
        STYLE
              COLOR 253 241 240
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "PVA"
        EXPRESSION "PVA"
        STYLE
              COLOR 249 210 205
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "RL"
        EXPRESSION "RL"
        STYLE
              COLOR 150 149 149
              OUTLINECOLOR 0 0 0         
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
         NAME "RY"
         EXPRESSION "RY"
          STYLE
              COLOR 238 235 220
              OUTLINECOLOR 0 0 0
          END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
          TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "RR"
          EXPRESSION "RR"
        STYLE
              COLOR 207 206 206
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "SX"
        EXPRESSION "SX"
        STYLE
              COLOR 181 214 174
              OUTLINECOLOR 0 0 0         
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
END # layer Solos_final_dd

########################

any thoughts?

thanks :)


--
Eduardo Zenaide



--
Eduardo Zenaide
Reply | Threaded
Open this post in threaded view
|

Re: Odd query result

Eduardo Zenaide
thanks Oscar. i'll try it as soon as i get to work.
about query code, i'm using GMap code.

2007/9/10, Oscar ^_^ <[hidden email] >:
Hello again Eduardo.
 
I can see You use for every class a template so that mean for every shape that has values for each class it returns this values.
 
I think You must use just a main template because You call the same template for every class so when shape has values for 2 fields (I think must be unique for use a class for every shape but maybe u've got more than one value for each shape) Mapserver returns this values for your query.
 
Try something like this:
 
LAYER
    NAME Solos_AL
    METADATA
        "DESCRIPTION" "Solos"
        "RESULT_FIELDS" "Leg_solos"
        "RESULT_HEADERS" "Código"
    END
    LABELITEM "Leg_solos"
    LABELCACHE ON
    TYPE POLYGON
    STATUS OFF
    DATA Solos_AL
    CLASSITEM "Leg_solos"
    TOLERANCE 0   #<-- I think you must put at least value 1
    TOLERANCEUNITS pixels
    TEMPLATE "templates/template_solos.html" #<-- This is what I mean
    CLASS
        NAME "PA"
        EXPRESSION "PA"
        STYLE
              COLOR 253 241 240
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END 
    END
    CLASS
        NAME "PVA"
        EXPRESSION "PVA"
        STYLE
              COLOR 249 210 205
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
    END
    CLASS
        NAME "RL"
        EXPRESSION "RL"
        STYLE
              COLOR 150 149 149
              OUTLINECOLOR 0 0 0         
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
    END
.
.
.
END #Layer
 
What about your code for query? it works fine? You can try debug your code too.
 
Hope it be helpful for You. 
 
 
Oscar.
 
 
2007/9/10, Eduardo Zenaide <[hidden email]>:
hi Oscar!

i'm using php/mapscript


2007/9/3, Oscar ^_^ <[hidden email]>:
Can You give more information about what are u doing?
 
Are you using mapscript or CGI or what?
 


 
2007/9/1, Eduardo Zenaide <[hidden email]>:
nobody? :(

2007/8/24, Eduardo Zenaide <[hidden email]>:
hi all,

i'm experiencing something odd here.
i have a soil layer with some IDs. its dbf is something like:

leg_solos

PVA
PA
RL
SX
RL
RY
RR
...

when i do the query, using ROSA i click in a RL polygon. it returns:

SX
RR
RL
PA
PA
PVA
PVA
RY
RY

any other polygon returns same results - only changes the one in query and, sometimes, PAs appear above. like:

SX
RR
PA
PA
SX
PVA
PVA
RY
RY

(when querying SX polygon)

here a visual example: <a href="http://www.uep.cnps.embrapa.br/imagens/queryexemplo.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.uep.cnps.embrapa.br/imagens/queryexemplo.jpg

my map file (its really big, so i'm just sending relevant layer and classes):

LAYER
    NAME Solos_AL
    METADATA
        "DESCRIPTION" "Solos"
        "RESULT_FIELDS" "Leg_solos"
        "RESULT_HEADERS" "Código"
    END
    LABELITEM "Leg_solos"
    LABELCACHE ON
    TYPE POLYGON
    STATUS OFF
    DATA Solos_AL
    CLASSITEM "Leg_solos"
    TOLERANCE 0
    TOLERANCEUNITS pixels
    CLASS
        NAME "PA"
        EXPRESSION "PA"
        STYLE
              COLOR 253 241 240
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "PVA"
        EXPRESSION "PVA"
        STYLE
              COLOR 249 210 205
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "RL"
        EXPRESSION "RL"
        STYLE
              COLOR 150 149 149
              OUTLINECOLOR 0 0 0         
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
         NAME "RY"
         EXPRESSION "RY"
          STYLE
              COLOR 238 235 220
              OUTLINECOLOR 0 0 0
          END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
          TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "RR"
          EXPRESSION "RR"
        STYLE
              COLOR 207 206 206
              OUTLINECOLOR 0 0 0
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
    CLASS
        NAME "SX"
        EXPRESSION "SX"
        STYLE
              COLOR 181 214 174
              OUTLINECOLOR 0 0 0         
        END
        LABEL
            FONT sans
            TYPE TRUETYPE
            PARTIALS TRUE
            SIZE 7
            OUTLINECOLOR 255 255 255
        END
        TEMPLATE "templates/template_solos.html"
    END
END # layer Solos_final_dd

########################

any thoughts?

thanks :)


--
Eduardo Zenaide



--
Eduardo Zenaide



--
Oscar ^_



--
Eduardo Zenaide



--
Oscar ^_



--
Eduardo Zenaide