[mapserver-dev] Template driven output - issue with PostGIS connection

thomas bonfort thomas.bonfort at gmail.com
Thu Jun 6 04:26:33 PDT 2013


Havard,
The postgis driver hasn't changed in trunk since 6.2. Can you enable
debugging on your postgis layer and post the query that is being sent to
the postgres backend?

regards,
thomas


On 6 June 2013 13:17, Havard Tveite <havard.tveite at umb.no> wrote:

> I have a PostGIS connection, and want to provide GeoJSON
> output.
>
> After some stumbling (and updating of the Mapserver docs!),
> I got it to work, except for the "using unique" part.
>
> The interesting parts of my DATA string is like:
>     DATA "geom from (select x.id as id, ...) as test using unique id
> using SRID=4326"
>
> This works well for WFS with GML, but when I add
> "&outputformat=geojson" (to get GeoJSON output), the returned
> id is a very large number (for instance 137051404431549 - it
> changes for each request), and it is the same number for all
> the features.  The actual ids are between 1 and 1000.
>
> I have the same issue when not using WFS (&mode=nquery&qformat=geojson)**.
>
> My template for geojson output is according to the documentation
> (and everything else is returned as it should).
>
> Could this be a bug?
>
> mapserv -v
> MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
> SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=OPENGL
> SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER
> SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS
> INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> I have not checked trunk.
>
>
> Håvard
> --
> Håvard Tveite
> Department of Mathematical Sciences and Technology, UMB
> Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
> Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/
> ______________________________**_________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/mailman/listinfo/mapserver-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130606/486835d8/attachment.html>


More information about the mapserver-dev mailing list