[Mapserver-users] Z values from 3D shapefiles (PHP MapScript)

Daniel Morissette morissette at dmsolutions.ca
Mon Jan 6 12:05:40 PST 2003


Daniel Morissette wrote:
> 
> "Hankley, Chip" wrote:
> >
> > I'd like to use the z values of the shapefile to create profiles... so what
> > I'm trying to do, is get the individual z values for each vertex in a shape.
> > So, I understand that I can't do this through mapScript... but I don't see a
> > way to do it with OGR either (albeit my OGR experience is pretty limited).
> > Am I missing something?
> 
> You could use the $layer->open()/close() and $layer->getShape() to read
> shapes out of an OGR data source (or any data source that MapServer
> supports).
> 
> The only problem is that those calls are intended to be used to read
> shapes returned by a query call, so they don't provide the equivalent of
> the shapefileObj->numshapes member.  Assuming your shapefile is not too
> big then you could do a queryByAttributes() with an attribute filter
> that matches all shapes in your layer, and then the query results will
> contain the shape id of all shapes in your layer.
> 
> It might also be possible to implement a new $layer->getNextShape()
> method that would allow someone to sequentially read all shapes using a
> layerObj.
> 
> Now, where do we go from there?  I'll file those comments in the bug
> report and we can continue the discussion there:
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=255
> 
> I would be interested in hearing what Steve thinks about adding support
> for Z values in MapServer since this implies an increase in size of the
> pointObj, which means more memory per shapeObj, all this for a feature
> that very few users will use.  Perhaps that should be made available as
> a compile option?
> 
> Daniel
> --
> ------------------------------------------------------------
>  Daniel Morissette               morissette at dmsolutions.ca
>  DM Solutions Group              http://www.dmsolutions.ca/
> ------------------------------------------------------------

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the MapServer-users mailing list