[Tickets] Re: [Python Cartographic Library] #87: DiskFeatureStore:
3D Polygons not handled
tickets at lists.gispython.org
tickets at lists.gispython.org
Wed Aug 16 11:55:07 EEST 2006
#87: DiskFeatureStore: 3D Polygons not handled
--------------------------------------+-------------------------------------
Reporter: ludwig | Owner: seang
Type: defect | Status: new
Priority: major | Milestone: 0.11
Component: Data Stores and Sources | Version:
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Comment (by ludwig):
This is definitely a 3D Shapefile issue. While 3D (or 2.5D) data cannot be
seen on mapserver maps, I think at least the X and Y data should be
available.
The first bits for handling 3D shapes that are missing is the mapping in
disk.py for the geometry type as reported by ogr. The GEOM_MAP does not
have the mapping set out. Extending the GEOM_MAP with the other geometry
types from ogr is easy.
{{{
GEOM_MAP = {
1: 'Point',
2: 'LineString',
3: 'Polygon',
....
}
}}}
On a mapping point of view I would think that is a mistake to duplicate
the key values from ogr.py, the safer way of coding this would be to take
the ogr values, such as
{{{
GEOM_MAP = {
ogr.wkbPoint: 'Point',
ogr.wkbLineString: 'LineString',
.....
ogr.wkbPoint25D: 'Point25D',
...
}}}
That not only makes it clearer where the values come from and that they
should not be altered in PCL, and if the ogr lib would ever change them,
PCL would not have to change.
With this change, at least inspection of the features in 3D libs is
possible in PCL.
Rendering however fails with the following error:
{{{
File "/opt/python243/lib/python2.4/site-
packages/cartography/engine/mapserver/rendering.py", line 235, in render
lo.draw(mo, im)
File "/opt/python243/lib/python2.4/site-packages/mapscript.py", line
788, in draw
def draw(*args): return _mapscript.layerObj_draw(*args)
MapServerError: msDrawShape(): General error message. Only polygon shapes
can be drawn using a POLYGON layer definition.
}}}
I think the first change suggested should be made, I am not sure what
changes would be required to draw only X and Y data from a 3D shapefile
and whether this would affect mapserver code or could be done in PCL.
--
Ticket URL: <http://trac.gispython.org/projects/PCL/ticket/87>
Python Cartographic Library <http://trac.gispython.org/projects/PCL/>
Python Cartographic Library
More information about the Tickets
mailing list