[mapserver-dev] Template driven output - issue with PostGIS connection
thomas bonfort
thomas.bonfort at gmail.com
Thu Jun 6 06:54:01 PDT 2013
ok... what template are you using?
[id] maps to the process id of the mapserver instance. are you using that
instead of [shpidx] ?
--
thomas
On 6 June 2013 15:50, Havard Tveite <havard.tveite at umb.no> wrote:
> The OGR based GeoJSON option seems OK. No trouble
> with the "using unique" attribute there.
>
> Håvard
>
>
> On 6/6/2013 2:00 PM, Smith, Michael ERDC-RDE-CRREL-NH wrote:
>
>> You could also try to isolate it to the template output by trying ogr
>> based geojson output (http://mapserver.org/output/**ogr_output.html<http://mapserver.org/output/ogr_output.html>
>> )
>>
>> OUTPUTFORMAT
>> NAME "OGR_GeoJson"
>> DRIVER "GeoJson"
>> FORMATOPTION "STORAGE=stream"
>> FORMATOPTION "FORM=simple"
>> END
>>
>>
>>
>> Mike
>>
>> On 6/6/13 7:49 AM, "Havard Tveite" <havard.tveite at umb.no> wrote:
>>
>> I have not tried with other data sources, so this may not be
>>> PostGIS related.
>>> I have sent Thomas the information from the PostgreSQL logs
>>> (the queries seemed to be the same for GML and geojson).
>>>
>>> Håvard
>>>
>>> On 6/6/2013 1:26 PM, thomas bonfort wrote:
>>>
>>>> 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
>>>> <mailto: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 <http://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 <tel:%2B47%2064965483> Fax: +47 64965401
>>>> <tel:%2B47%2064965401> http://www.umb.no/imt/
>>>> ______________________________**___________________
>>>> mapserver-dev mailing list
>>>> mapserver-dev at lists.osgeo.org <mailto:mapserver-dev at lists.**
>>>> osgeo.org <mapserver-dev at lists.osgeo.org>>
>>>> http://lists.osgeo.org/__**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/__mailman/listinfo/mapserver-dev>
>>>> <http://lists.osgeo.org/**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/mailman/listinfo/mapserver-dev>
>>>> **>
>>>>
>>>>
>>>>
>>> --
>>> 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>
>>>
>>
>>
>>
>>
> --
> 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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130606/bbe19a12/attachment-0001.html>
More information about the mapserver-dev
mailing list