[postgis-users] Postgis layer in mapserver

Oscar Testa otesta at s6.coopenet.com.ar
Fri Nov 15 06:44:45 PST 2002


Ok, but my data express the next:

  DATA "the_geom from (select locarg.oid as oid, locarg.the_geom as
the_geom, localidad.nombre as nombre from locarg, localidad where
locarg.codpostal = localidad.codigopostal) AS prueba USING SRID=4326 
USING
UNIQUE oid"

and the error is the next:

MapServer Error in msPOSTGISLayerWhichShapes(): prep_DB:Error executing
POSTGIS DECLARE statement (0.6 failed - retried 0.5 and it failed too).
DECLARE mycursor BINARY CURSOR FOR SELECT
Provincia::text,asbinary(force_collection(force_2d
(the_geom)),'NDR'),OID::te
xt from (select locarg.oid as oid, locarg.the_geom as the_geom,
localidad.nombre as nombre from locarg, localidad where 
locarg.codpostal =
localidad.codigopostal) AS prueba USING SRID=-1 USING UNIQUE oid WHERE
the_geom &&
setSRID('BOX3D(-78.22636066 -55.575152,-48.54710934 -20.90357)'::BOX3D,
find_srid('','locarg,','the_geom') )

??????

About classes in mapserver, i have no problem.  My problem at this 
moment is
the join....

Thanks
Oscar

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


> Quoting Oscar Testa <otesta at siu.edu.ar>:
> > 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??
>
> This is exactly what my example was intending to show. Once you have 
done
the
> subselect, and added the data from the second table (b.data in my 
example)
you
> can then have use mapserver classes to define themes based on that 
data.
> Consider a slight variation of my original example:
>
> DATA "the_geom FROM (SELECT a.oid AS oid, a.the_geom AS the_geom, 
b.type
AS
> type FROM a, b WHERE a.key = b.key) AS foo USING SRID=-1 USING UNIQUE 
oid"
> CLASSITEM "type"
> CLASS
>   EXPRESSION "1"
>   COLOR 255 0 0
> END
> CLASS
>   EXPRESSION "2"
>   COLOR 0 255 0
> END
>
> So, the geometry data is in table "a", and the classification 
information
is in
> a related table "b", in the column named type. Using the standard
mapserver
> classifcations/theming I have specified that type "1" features should 
be
> colored red, and type "2" features should be colored blue.
>
> Does this give you what you need to know? Basically, as long as you 
can
write a
> query that puts the geometry next to the classification variable, 
then you
can
> let mapserver do the rest.
>
> 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