Can't see data
Kralidis,Tom [Burlington]
Tom.Kralidis at EC.GC.CA
Tue Feb 1 04:48:55 PST 2005
I still can't see much.
I did try changing the DATA def to:
DATA "the_geom FROM service_endpoints" # i.e. FROM instead of from
..and got back a couple of observations:
1./
Doing a DescribeFeatureType returns nothing from the table
2./
Doing a WMS GetMap gets a service exception which says:
<ServiceExceptionReport version="1.1.1">
<ServiceException>
msDrawMap(): Image handling error. Failed to draw layer named
'service_endpoints'.
prep_DB(): Query error. Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d()),'NDR'),OID::text from WHERE &&
setSRID('BOX3D(-179.678571459515 -112.299107162197,179.678571459515
112.299107162197)'::BOX3D, find_srid('','','') )' <br><br>
Postgresql reports the error as 'ERROR: syntax error at or near "WHERE"
at character 104
'<br><br>
More Help:<br><br>
Error with POSTGIS data variable. You specified '<check your .map
file>'.<br>
Standard ways of specifiying are : <br>
(1) 'geometry_column from geometry_table' <br>
(2) 'geometry_column from (<sub query>) as foo using unique
<column name> using SRID=<srid#>' <br><br>
Make sure you put in the 'using unique <column name>' and 'using
SRID=#' clauses in.
<br><br>For more help, please see
http://postgis.refractions.net/documentation.php
<br><br>Mappostgis.c - version of Jan 23/2004.
msPOSTGISLayerParseData(): Query error. Error parsing POSTGIS data
variable. Must contain 'geometry_column from table_name' or 'geom from
(subselect) as foo' (couldnt find ' from '). More help: <br><br>
Error with POSTGIS data variable. You specified 'the_geom FROM
service_endpoints'.<br>
Standard ways of specifiying are : <br>
(1) 'geometry_column from geometry_table' <br>
(2) 'geometry_column from (<sub query>) as foo using unique
<column name> using SRID=<srid#>' <br><br>
Make sure you put in the 'using unique <column name>' and 'using
SRID=#' clauses in.
<br><br>For more help, please see
http://postgis.refractions.net/documentation.php
<br><br>Mappostgis.c - version of Jan 23/2004.
</ServiceException>
</ServiceExceptionReport>
Oh, BTW, I'm using MapServer CVS on a fedora box and postgis-1.0.0rc2.
I was worrying that this
..Tom
> -----Original Message-----
> From: Paul Ramsey [mailto:pramsey at refractions.net]
> Sent: Monday, 31 January, 2005 16:16
> To: Kralidis,Tom [Burlington]
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Can't see data
>
>
> Any change your bbox is not in fact over your data?
> (projection, etc?)
> Turn on DEBUG and see what the SQL being generated is. Put it
> into psql
> and see what you get.
>
> Paul
>
> Kralidis,Tom [Burlington] wrote:
>
> > (I wasn't sure which list to post to [mapserver-users |
> > postgis-users], so I try this one first)
> >
> > Hi,
> >
> > I have (I think) successfully loaded data into PostGIS and
> am trying
> > to access it via MapServer WMS / WFS.
> >
> > I verified that the data in the PostGIS instance is okay by running
> > pgsql2shp and testing the output shapefile. Except for
> truncated col
> > names, all is well.
> >
> > Here's my mapfile chunk:
> >
> > # mapfile chunk:
> >
> > NAME "service_endpoints"
> > CONNECTIONTYPE postgis
> > CONNECTION "user=postgres dbname=devgeodb"
> > DATA "the_geom from service_endpoints"
> >
> > In WMS, when I run a GetCapabilities on the server, all is fine.
> >
> > In WMS, when I run a GetMap on the server, I get a blank map back.
> >
> > In WFS, when I run a GetCapabilities on the server, all is fine.
> >
> > In WFS, when I run a DescribeFeatureType on the server, all
> is fine.
> > You can see the table just fine.
> >
> > In WFS, when I run a GetFeature on the server, I get a blank result
> > set
> > back:
> >
> > <wfs:FeatureCollection
> xsi:schemaLocation="http://www.opengis.net/wfs
> > http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd
> > http://www.ec.gc.ca/eccat
> >
> http://devgeo.cciw.ca/cgi-bin/mapserv/eccat?SERVICE=WFS&VERSION=1.0.0&
> > RE
> > QUEST=DescribeFeatureType&TYPENAME=service_endpoints">
> > <gml:boundedBy>
> > <gml:null>missing</gml:null>
> > </gml:boundedBy>
> > </wfs:FeatureCollection>
> >
> > Any hints as to what's going on? If MapServer wasn't connecting to
> > PostGIS correctly, then the WFS DescribeFeatureType request
> wouldn't
> > be able to read the table.
> >
> > ..Tom
>
>
More information about the MapServer-users
mailing list