[SoC] Integrating new geometries in OGR for GDAL - Weekly Report 12

Avyav Kumar avyavkumar at gmail.com
Mon Aug 15 22:37:56 PDT 2016

Hi all,

Here is my final report for GSoC -

>>> Brief description of the idea

Currently the OGR geometry core of GDAL does not provide support for
Triangulated Surfaces, Polyhedral Surfaces and Triangle API. The problem
caused by this is twofold; users who are exposed to image formats/drivers
which have some vector feature conforming to the above are unable to
exploit OGR's powerful core due to a lack of support [or hacky support at
best], and it also limits the functionality of OGR when operating on
vectors which have features corresponding to the troublesome geometries. My
idea is to introduce these geometries to the OGR core; develop a
bare-bones, yet complete API which is flexible enough to be built on top of
the existing OGR core and minimal enough to easily enhance; introduce
support for select drivers by rewriting the relevant/deprecated parts; test
everything I have written rigorously and provide concise documentation for
the same.

>>> The state of the project as it was BEFORE GSoC.

As of now, the OGRGeometry <http://www.gdal.org/classOGRGeometry.html>
class [the base class from which all the subtypes are derived] is limited
to OGRCompoundCurve, OGRCircularString, OGRLinearRing, OGRMultiLineString,
OGRMultiPoint, OGRMultiPolygon, OGRMultiCurve, OGRSimpleCurve,
OGRCurvePolygon and OGRPolygon. According to the standard mentioned by OGC
06-103r4, OGR still lacks proper implementation for a PolyhedralSurface,
Triangle and TriangulatedSurface. This is correspondingly reflected in
drivers provided by OGR. Another aspect of implementing a suitable API for
the said geometries in the core is that it will help OGR progress further
in the introduction of drivers, such as CityGML which heavily utilise such
network based geometries. Proper implementation of OGR's 3D geometries
would also bring closer interoperability with PostGIS-based 3D functions.

>>> The addition that your project brought to the software.

There is a brief description of the geometries I implemented -

Triangle - A subset of polygons, the fundamental difference is that of 3
nodes only and ONLY ONE exterior boundary and NO interior polygons.

PolyhedralSurface - A 3D figure made exclusively of Polygons.

TriangulatedSurface - A subset of PolyhedralSurface; a 3D figure which
consists exclusively of Triangles.

There will be a change in the OGRGeometry class diagram [the one mentioned
in RFC 49 <https://trac.osgeo.org/gdal/wiki/rfc49_curve_geometries>]. The
changed class diagram is available here
The new geometries are highlighted in red.

Along with that, I have also modified the following drivers for OGR -
PostGIS, ShapeFile, DXF and GML to work properly (reading + writing
capabilities) for the new geometries.

>>> Relevant Links

The work is hosted at Github in my fork of the gdal repository. All links
are listed below -

https://github.com/avyavkumar/gdal/wiki - The official wiki which contains
all details of commits, branches, weekly reports and TRAVIS build

Quick references -

https://github.com/avyavkumar/gdal/wiki#list-of-commits - List of commits
per branch

https://github.com/avyavkumar/gdal/wiki#git-branches - Current status of
TRAVIS builds per branch

https://github.com/avyavkumar/gdal/wiki#details-of-work-done - Weekly

>>> Class Diagram

The modified class diagram can be seen here

Finally, my sincere thanks to both of my mentors - Rob Emanuele and Even
Rouault. They have been truly helpful, and I have learned a lot from them.


Avyav Kumar Singh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/soc/attachments/20160816/73f5a07a/attachment-0001.html>

More information about the SoC mailing list