[mapserver-users] UMN + Postsgis, features skipped

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jul 12 09:45:24 EDT 2010


For the record, when I hit this wall, I always view what features are 
returned by using the ogrinfo commandline utility (and therefore cutting 
out the possibilities of problems specific to MapServer).  In this case 
you can pass expressions through the '-sql' switch in ogrinfo:


  ogrinfo PG:"host=127.0.0.1 user=postgres password=postgres 
dbname=canada port=5432" -sql "select blah from blah where blah=blah"

Happy mapserving.

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




Andreas Neumann wrote:
> ok - the problem is solved.
> 
> The source table was a view and it turned out that some fields had an
> invisible line break at the end of the string and therefore did not match
> with the expression. In the table they visually looked the same, but one
> did not immediately see the line break at the end ...
> 
> All fine now and sorry for the fuss ...
> 
> Thanks for trying to help!
> Andreas
> 
> On Mon, July 12, 2010 3:31 pm, Michael Schulz wrote:
>> Hi Andreas,
>>
>> could you try the map-file with the layer EXTENT removed and see if
>> that improves the situation? I seem to remember having a similar
>> problem, with the layer extent parameter, that is generated by the
>> QGIS mapfile exporter.
>>
>> Cheers, Michael
>>
>>
>> 2010/7/12 Andreas Neumann <a.neumann at carto.net>:
>>> Hi all,
>>>
>>> I have troubles with the UMN/Postgis combo. When I just draw the layer
>>> with a single class, it draws fine, but as soon as I use classification
>>> with an EXPRESSION (simple string comparison), a lot of features are
>>> skipped.
>>>
>>> Attached I am sending a mapfile with just one class (buildings from a
>>> landcover table). Most buildings are skipped, only a few are drawn.
>>>
>>> I have no idea why.
>>>
>>> The same table draws fine without problems in QGIS.
>>>
>>> Any idea why the classification is skipping many features?
>>>
>>> Thanks a lot,
>>> Andreas
>>>
>>> --
>>> Andreas Neumann
>>> http://www.carto.net/neumann/
>>> http://www.svgopen.org/



More information about the mapserver-users mailing list