[Qgis-developer] QGIS and 3D vectorial data

Tim Sutton tim at linfiniti.com
Tue Dec 4 10:02:07 EST 2007


Hi

2007/12/4, Benjamin Ducke <benjamin.ducke at ufg.uni-kiel.de>:
> Dear all,
>
> I am participating in the planning for a long-term project which (if the
> proposal gets accepted) may come up with a budget to pay for
> some QGIS extensions.
>
> There will be a heavy focus on surveying data in 3D.
>
> My question is: in how far is the QGIS kernel prepared to deal
> with 3D vector data? Are the data structures in place and does
> QGIS maintain Z coordinates or do they get discarded?
>

Looking at e.g. the ogr provider, the data for a point for example
gets read in as an OGRPoint which includes support for z values.

http://gdal.org/ogr/classOGRPoint.html

e.g. in teh ogr provider:

 489         OGRPoint* p=new OGRPoint();
 490         p->importFromWkb(wkb,1+sizeof(int)+2*sizeof(double));
 491         err = feature->SetGeometry(p);

however other places in the code dont persist Z data e.g. from QgsGeometry:

  95 QgsGeometry* QgsGeometry::fromPoint(const QgsPoint& point)
  96 {
  97   GEOS_GEOM::Coordinate coord = GEOS_GEOM::Coordinate(point.x(),
point.y());
  98   GEOS_GEOM::Geometry* geom = geosGeometryFactory->createPoint(coord);
  99   QgsGeometry* g = new QgsGeometry;
 100   g->setGeos(geom);
 101   return g;
 102 }

I think that some work would be needed to go through all providers and
make sure they are retrieving Z data where available. Additional work
would be required to ensure the Z property is set in geometry class.

I think this is quite do-able...others who are closer to the vector
code please correct me if I got anything wrong above...

Regards

Tim

> Best wishes,
>
> Benjamin
>
>
> --
> Benjamin Ducke, M.A.
> Archäoinformatik
> (Archaeoinformation Science)
> Institut für Ur- und Frühgeschichte
> (Inst. of Prehistoric and Historic Archaeology)
> Christian-Albrechts-Universität zu Kiel
> Johanna-Mestorf-Straße 2-6
> D 24098 Kiel
> Germany
>
> Tel.: ++49 (0)431 880-3378 / -3379
> Fax : ++49 (0)431 880-7300
> www.uni-kiel.de/ufg
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>


-- 
Tim Sutton
QGIS Project Steering Committee Member - Release  Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list