[mapserver-dev] Python-MapScript: Passing Geometry

Fabian Schindler fabian.schindler at eox.at
Mon Dec 10 02:24:43 PST 2012


Hi devs,

In our application we use MapScript to configure a WMS service to 
service satellite imagery. One feature is to display the outlines of the 
images using a vector layer. We are currently doing this using an SQL 
connection to the database.

We found this prone to errors as the query also involved a time span 
which is not time zone aware. Also, we use Djangos ORM to set up our 
database layout, so we have to apply changes to the custom query SQL 
every time the data models receive changes.

So I'm looking for alternatives and I found the FEATURE object would 
suit our needs, as we already have retrieved the geometry from the 
database, which we could serialize as WKT. Unfortunately, I could not 
find any `featureObj` or the like in MapScript and the `layerObj` does 
not have a `feature` property.

Do I miss something here? Is there another possibility to easily pass 
geometry too a `layerObj` without relying on files on the disk or a 
database connection?

Thanks,
Fabian


More information about the mapserver-dev mailing list