[Mapserver-users] sub-select

Jan Hartmann jhart at frw.uva.nl
Fri Dec 27 06:48:40 EST 2002


Try: using UNIQUE= ... using SRID= ... exactly as spelled (lowercase 
using, uppercase SRID). In the most recent CVS version this  has been 
remedied, but if you use an earlier one (even 3.7), this spelling is 
compulsory.

Jan

nida Khan wrote:
> Hi Jan,
> 
> Thank you so much for pointing me to that document, it really helped me to
> understand the way mapserver understand the queries but I'm still stuck with
> my problem.
> 
> Before I was getting a blank image, After reading the document I created to
> indexes one on the geom. other on oid.
> 
> now I chaged srid to SRID as well... and this time I got this error
> 
> msPOSTGISLayerWhichShapes(): Query error. prep_DB:Error executing POSTGIS
> DECLARE statement (0.6 failed - retried 0.5 and it failed too). DECLARE
> mycursor BINARY CURSOR FOR SELECT
> asbinary(force_collection(force_2d(the_geom)),'XDR'),OID::text from (select
> oid, the_geom from westminster) AS foo USING UNIQUE oid USING SRID=-1 WHERE
> the_geom && setSRID('BOX3D(145300 170784,366100 391216)'::BOX3D,
> find_srid('','westminsterary','the_geom') )
> 
> here is my layer
> LAYER # start of the "unitary_boundary" layer object
>   CONNECTIONTYPE postgis
>   NAME "unitary_boundary"
>   CONNECTION "host=127.0.0.1 port=5432 user=postgres password=blah
> dbname=test"
>   DATA "the_geom from (select oid, the_geom from westminster) AS foo USING
> UNIQUE oid USING SRID=-1"
>   STATUS DEFAULT
>   TYPE LINE
>   CLASS
>     NAME "Unitary"
>     COLOR 0 0 0
>     OUTLINECOLOR 240 240 240
>   END # end of class object
> END # end of layer object
> 
> 
> With Kind Regards
> Nida.
> 
> 
> ----- Original Message -----
> From: "Jan Hartmann" <jhart at frw.uva.nl>
> To: <mapserver-users at lists.gis.umn.edu>
> Sent: Friday, December 20, 2002 6:35 PM
> Subject: Re: [Mapserver-users] sub-select
> 
> 
> 
>>using SRID= ... using UNIQUE=.. are only necessary in subselects, so
>>they are not needed in your first two data statements . A description
>>for this has recently been added to the docs in
>>
>>http://postgis.refractions.net/docs/x549.html#AEN607
>>
>>What exactly does the third statement do? Does it return an error or
>>just a blank map?
>>
>>Jan Hartmann
>>
>>nida Khan wrote:
>>
>>>hmmmmm... strange
>>>
>>>its seems really odd, it works other way round for me.
>>>when I do
>>>the_geom from westminster using unique oid using SRID=-1
>>>it does NOT work
>>>
>>>but this one does
>>>the_geom from westminster using unique oid using srid=-1
>>>
>>>And when I add
>>>the_geom from (select oid,the_geom from westminster) as foo using unique
> 
> oid
> 
>>>using srid=-1
>>>
>>>it does not display that layer!!!
>>>
>>>Can you also explain me or point me to a right document which explain
> 
> the
> 
>>>logic of using "srid"??
>>>
>>>I'm kinda stuck at this point :(.
>>>
>>>Thank you very much for your response!
>>>Regards
>>>Nida.
>>>
>>>----- Original Message -----
>>>From: "Jan Hartmann" <jhart at frw.uva.nl>
>>>To: <mapserver-users at lists.gis.umn.edu>
>>>Sent: Friday, December 20, 2002 12:55 PM
>>>Subject: Re: [Mapserver-users] sub-select
>>>
>>>
>>>
>>>
>>>>Nida,
>>>>
>>>>You have to put SRID in capitals!. This is a small but very annoying bug
>>>>that has been reported before
>>>>
>>>
>>>
> (http://postgis.refractions.net/pipermail/postgis-users/2002-November/001757
> 
>>>.html)
>>>
>>>
>>>>but has not been resolved yet.
>>>>
>>>>Jan Hartmann
>>>>
>>>>nida Khan wrote:
>>>>
>>>>
>>>>>Hi Everyone,
>>>>>
>>>>>I want to do a subselect from my .map file. I went through some
>>>>>list-archive from that I tried these statements.
>>>>>
>>>>>DATA "the_geom from westminster"  works fine
>>>>>DATA "the_geom from westminster using unique oid using srid=-1"
> 
> works
> 
>>>>>fine
>>>>>DATA "the_geom from (select oid,the_geom from westminster) as foo using
>>>>>unique oid using srid=-1"  no result
>>>>>
>>>>>I've got two tables, one with geom, other with features... I want to
>>>>>display the certain feature as label on the map.
>>>>>
>>>>>What I'm missing in the above sql? Am I doing anything wrong? Is there
>>>>>anything on database level that I have to change?
>>>>>
>>>>>Will Appreciate any inputs
>>>>>Regards
>>>>>Nida.
>>>>>
>>>>
>>>>Jan Hartmann
>>>>Department of Geography
>>>>University of Amsterdam
>>>>jhart at frw.uva.nl
>>>>
>>>>_______________________________________________
>>>>Mapserver-users mailing list
>>>>Mapserver-users at lists.gis.umn.edu
>>>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>>
>>>
>>>_______________________________________________
>>>Mapserver-users mailing list
>>>Mapserver-users at lists.gis.umn.edu
>>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>>
>>
>>Jan Hartmann
>>Department of Geography
>>University of Amsterdam
>>jhart at frw.uva.nl
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 
> 
> 




More information about the mapserver-users mailing list