wiki:GSoC_gdal2ogr_api

Version 6 (modified by warmerdam, 15 years ago) ( diff )

add a couple resource urls.

Project:

gdal2ogr API in libgdal

Student:

Kedron Touvell me@…

Mentor:

Tim Keitt

Abstact:

This project will extend the gdal2ogr library and add APIs that take raster data as input and output vector data (and possibly vice versa). The simplest conversion is from raster (with implicit x, y cordinates) to a point coverage (x, y, z). The next simplest would be to output square polygons one-per-pixel (a set of four points x1 y1, x2 y2, x3 y3, x4 y4 plus a single z value). After that we could do larger rectangles where the z-value is the average or another statistic computed on the pixels falling within the quadrangle. After that comes hexagonal grids with user specified width (resolution). After that (and possibly the most interesting) we will explore outputting various mesh representations (triangulations) of the surface. These are sometimes called TINs in the GIS lexicon.

Development Resources

Weekly Reports

Week 1 (ending June 5)

I got off to a slow start due to a time-consuming apartment move and a poorly-timed illness. Still, I fully expect that I can catch up in the next week or two. I've started by downloading the gdal source using svn and successfully built it in cygwin (I'm using the latest development branch - 1.70 - revision 17199). Cygwin is handy for me because my laptop is dual boot with Ubuntu, but my campus wireless network performance is slow in linux. If I run into cygwin-related oddities I'll switch to Ubuntu.

In researching the project, I found a number of open sourced, GPL raster to vector conversion software packages online that I'm currently investigating. I expect that I may be able to cannibalize some of that code for parts of this project.

Currently, I am not blocked with anything, though I am working with my mentor to get more input from the community on what specific conversion routines they would like to see. My biggest goal for the next week is to evaluate what existing code and algorithms are out there that can be re-used in libgdal for this API. Then I will begin testing for performance, etc.

Week 2 (ending June 12)

As many pointed out, GPL code is incompatible with the MIT/X license that gdal uses, so I will be unable to integrate existing code into this project. We did find an existing undocumented utility called gdal2ogr that was added to gdal in the 1.6 release. Currently, it converts from a GDAL dataset to an OGR datasource. It creates point, point25d, and polygons currently. For this project, we're not as interested in complex polygons, but the point output was the first output type we planned to support.

Moving forward, we are going to add a TIN type to this command and also add an API for this functionality to libgdal. This week, I did some algorithm research and started coding. Next week, I hope to have a prototype semi-functional and perhaps a completed design document for the additions.

Week 3 (ending June 19)

I'm continuing to work on additions to the gdal2ogr command to support TINs. I had some trouble getting the latest SVN 1.7 to compile, so I'm working with version 1.6. I will migrate and debug the 1.7 build problems when I have functionality ready to port. Other than that, no blocking problems.

Most of my algorithmic research has come from the book Advances in Digital Terrain Analysis by Qiming Zhou et al (ISBN 9783540777991). It's a dense, 450 page tome, so it's taking some time.

Note: See TracWiki for help on using the wiki.