<div dir="ltr">Hi all, <div><br></div><div>Here is my final report for GSoC - </div><div><br></div><div>>>> Brief description of the idea</div><div><br></div><div><span id="docs-internal-guid-d76a09c9-91c9-3254-9c5e-b221d14e1d0c"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">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.</span></p><div><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><br></span></div><div><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">>>> The state of the project as it was BEFORE GSoC.</span></div><div><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><br></span></div><div><span style="vertical-align:baseline;background-color:transparent"><span id="docs-internal-guid-d76a09c9-91c9-c8fc-37c8-ba3780d69253"><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent">As of now, the </span><a href="http://www.gdal.org/classOGRGeometry.html" style="text-decoration:none"><span style="font-size:13.3333px;text-decoration:underline;vertical-align:baseline;background-color:transparent">OGRGeometry</span></a><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent"> 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.</span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent"><br></span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent">>>> The addition that your project brought to the software.</span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent"><br></span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">There is a brief description of the geometries I implemented -</span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Triangle - A subset of polygons, the fundamental difference is that of 3 nodes only and ONLY ONE exterior boundary and NO interior polygons.</span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">PolyhedralSurface - A 3D figure made exclusively of Polygons.</span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;font-family:Arial;color:rgb(0,0,0);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">TriangulatedSurface - A subset of PolyhedralSurface; a 3D figure which consists exclusively of Triangles.</span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent"><span id="docs-internal-guid-d76a09c9-91ca-dfa6-d607-0ac1b373a7fc"><br><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent">There will be a change in the OGRGeometry class diagram [the one mentioned in <a href="https://trac.osgeo.org/gdal/wiki/rfc49_curve_geometries">RFC 49</a>]. The changed class diagram is available <a href="https://www.dropbox.com/sh/4imwketk6b6ttmh/AAD9wPGn1NTONSFep0b1C7SMa/class-diagram.png?dl=0">here</a>. The new geometries are highlighted in red. </span></span><br></span></p><p dir="ltr" style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent"><span><span style="font-size:13.3333px;vertical-align:baseline;background-color:transparent"><br></span></span></span></p><p style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt">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.  </p><p style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><br></p><p style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt">>>> Relevant Links </p><p style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><br></p><p style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt">The work is hosted at Github in my fork of the gdal repository. All links are listed below - </p><p style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;white-space:pre-wrap;line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="line-height:1.38;font-size:13.3333px;background-color:transparent"><br></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;line-height:18.4px;white-space:pre-wrap;background-color:transparent"><font color="#000000" face="Arial"><a href="https://github.com/avyavkumar/gdal/wiki">https://github.com/avyavkumar/gdal/wiki</a> - The official wiki which contains all details of commits, branches, weekly reports and TRAVIS build information. </font></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:1.38;white-space:pre-wrap;background-color:transparent">Quick references - </span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;line-height:18.4px;white-space:pre-wrap;background-color:transparent"><font color="#000000" face="Arial"><a href="https://github.com/avyavkumar/gdal/wiki#list-of-commits">https://github.com/avyavkumar/gdal/wiki#list-of-commits</a> - List of commits per branch</font></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;line-height:18.4px;white-space:pre-wrap;background-color:transparent"><font color="#000000" face="Arial"><a href="https://github.com/avyavkumar/gdal/wiki#git-branches">https://github.com/avyavkumar/gdal/wiki#git-branches</a> - Current status of TRAVIS builds per branch</font></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="font-size:13.3333px;line-height:18.4px;white-space:pre-wrap;background-color:transparent"><font color="#000000" face="Arial"><a href="https://github.com/avyavkumar/gdal/wiki#details-of-work-done">https://github.com/avyavkumar/gdal/wiki#details-of-work-done</a> - Weekly reports</font></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:1.38;white-space:pre-wrap;background-color:transparent">>>> Class Diagram</span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:1.38;white-space:pre-wrap;background-color:transparent">The modified class diagram can be seen </span><a href="https://www.dropbox.com/sh/4imwketk6b6ttmh/AAD9wPGn1NTONSFep0b1C7SMa/class-diagram.png?dl=0" style="font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap">here</a><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap">.</span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap"><br></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap">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. </span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap"><br></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap">Regards,</span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap"><br></span></p><p style="margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);font-family:Arial;font-size:13.3333px;line-height:18.4px;white-space:pre-wrap">Avyav Kumar Singh</span></p></span></span></div></span></div></div>