Res: [postgis-users] Trouble getting PostGIS data to display in MapServer

Ezequias Rodrigues da Rocha ezequias at recife.pe.gov.br
Thu Jul 14 11:15:42 PDT 2005


I use Status "On" to Jump and "Default" for Web (browser).

Try it out.

Best wishes
Ezequias 
 
-------Mensagem original-------
 
De: Jason Burkhardt
Data: 07/14/05 14:06:15
Para: postgis-users at postgis.refractions.net
Assunto: [postgis-users] Trouble getting PostGIS data to display in
MapServer
 
I'm really sure this must be something simple I'm missing, but I'm at my
wits end and am not getting any further by staring at it.  Hopefully a
fresh set of eyes can help me out.
I'm running MapServer & have a viewer up displaying data from a variety of
sources (WMS, .tif's, shapefiles) and would like to include PostGIS data.
I created a simple PostgreSQL db with a table called cities (this table was
created with oids) that has a name, state_name and point field.
I created the point field as such:
      select AddGeometryColumn('cities', 'point', 4326, 'POINT', 2);
A sample of the data I'm inserting looks like this:
      insert into cities (name, state, point) values('Albany', 'NY',
GeometryFromText('POINT(73 42)',4326));
 
I then created 2 indexes as so:
      CREATE INDEX cities_index ON cities USING GIST (point
GIST_GEOMETRY_OPS)
      CREATE INDEX cities_index_oid ON cities (name)
I've also done the second index with point as the unique column, I don't
really care which it is at this point.
 
Onto MapServer my layer definition looks like this:
LAYER
  CONNECTIONTYPE postgis
  CONNECTION "user=postgres password=pgadmin dbname=test host=localhost"
  DATA "point from cities"
  NAME "PostGIS Cities Test"
  TYPE POINT
  STATUS ON
  CLASS
      COLOR 255 0 0
      SIZE 50
  END
  PROJECTION
    "init=epsg:4326"
  END
END
 
Every other layer I have is also 4326.  It's connecting to the database &
not throwing any errors that I can see from the PostgreSQL logs (I've run
them with varying levels of verbosity).  MapServer does not return a broken
image when the layer is turned on, I just don't see the point displayed.
I would appreciate any comments/insight.
 
Thanks,
Jason
 
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050714/766dfedb/attachment.html>


More information about the postgis-users mailing list