Go package for working with Who's On First documents and ESRI shapefiles.
You will need to have both
Go (specifically a version of Go more recent than 1.6 so let's just assume you need Go 1.8 or higher) and the
make programs installed on your computer. Assuming you do just type:
All of this package's dependencies are bundled with the code in the
This works. Until it doesn't. Currently it only write points and polygons.
There is a lot still to do including moving code in to generic package (library) functions and sorting out common attributes.
./bin/wof-shapefile-index -h Usage of ./bin/wof-shapefile-index: -belongs-to value Include only records that belong to this ID. You may pass multiple -belongs-to flags. -exclude-placetype value Exclude records of this placetype. You may pass multiple -exclude-placetype flags. -include-placetype value Include only records of this placetype. You may pass multiple -include-placetype flags. -mode string The mode to use importing data. Valid modes are: directory,feature,feature-collection,files,geojson-ls,meta,path,repo,sqlite. (default "repo") -out string Where to write the new shapefile -shapetype string The shapefile type to use indexing data. Valid types are: POINT,POLYGON. (default "POINT") -timings Display timings during and after indexing
$> ./bin/wof-shapefile-index -shapetype POLYGON -out test.shp -mode repo /usr/local/data/whosonfirst-data-constituency-us/ ...time passes $> du -h test.* 3.0M test.dbf 4.0K test.prj 401M test.shp 56K test.shx
All of which ends up looking something like this: