[postgis-users] Postigs layer in Mapserver

Oscar Testa otesta at siu.edu.ar
Thu Nov 14 13:18:29 PST 2002


Ok, thanks.
But, i need the following:

I have a table with map objects in postgre/postgis.  I want add information
from other tables in postgresql to create thematic mappings in mapserver.
How can i do this??

Best regards,
Oscar
----- Original Message -----
From: <chodgson at refractions.net>
To: <postgis-users at postgis.refractions.net>
Sent: Thursday, November 14, 2002 5:56 PM
Subject: Re: [postgis-users] Postigs layer in Mapserver


>
> >   DATA "the_geom from (select locarg.the_geom, locarg.oid, count(*) as
> > cantidad from locarg, lugar where locarg.codpostal = lugar.codigopostal
> > group by 1,2) as prueba"
>
> I'm not familiar with the "group by 1,2" syntax... as far as I know, you
need
> to group by column names, like "group by column1, column2". Also, when you
do a
> subselect you should always specify "using SRID=-1 using unique oid" or
> something similar with whatever SRID you are actually using. For example:
>
> DATA "the_geom FROM (SELECT a.oid, a.the_geom, a.data, b.data FROM a, b
WHERE
> a.key = b.key) AS foo USING SRID=-1 USING UNIQUE oid"
>
> The reason for "USING SRID=-1" is that postgis doesn't know what table the
> geometry inside a join is coming from (in a complex query the geometries
could
> actually be coming from multiple different tables) and so it cannot look
up in
> the "geometry_columns" table to find the SRID. the reason for the "USING
UNIQUE
> oid" is to tell mapserver to use the oid as the unique id by which to
reference
> features in map queries. You could tell mapserver to use a different
column
> than the oid, but this isn't usually necessary. This is also the reason
why you
> need to include the oid of the geometry table in the sub-select.
>
> Hopefully that will help...
> Chris
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list