autoredistrict
autoredistrict copied to clipboard
Use geotools for shapefile functionality
We depend on geotools and a lot of tools that depend on geotools at the USGS. It's a stable, well-tested, actively-developed, and widely-used geospatial library. We can import only the shapefile functionality into autoredistrict.
Docs on the shapefile module: http://docs.geotools.org/latest/userguide/library/data/shape.html
Advantages of geotools over current checked-in dependencies:
- it has automated tests, and by virtue of being widely-used, is battle-tested against many corner cases
- many GS-savvy developers are already familiar with the geotools APIs, so it would lower the barrier to contribution
- geotools has official support for a very large list of geospatial data that we could add autoredistrict support for in the future
- the geotools project publishes their artifacts in maven central so if we move to a formal dependency management solution like maven, gradle, or ivy, we could stop checking in the jar
the only functionality i need from shapefile is:
- read in the shapes, to coordinates
- read and write the .dbf data
i found the smallest and simplest package i could for that and used only what was needed.
i want to keep unneccessary code complexity to a minimum.
need some enhancement ideas that would justify the extra code first. no need to add the extra code if there literally is no need to add the extra code.