-
Notifications
You must be signed in to change notification settings - Fork 1
Taxlots As A Model
Ryan Hodges edited this page Jun 28, 2017
·
5 revisions
- Create model in landmapper models.py file
- Import PolygonFeature from feature.models
- All taxlots will be polygons, so no need to mess with other Geometries
- Actually, MultiPolygon may be possible... ignoring for now
- Borrow heavily from mp-drawing/drawing/models.py AOI
- manage.py makemigrations landmapper (done already if you see landmapper/migrations/0001...)
- manage.py migrate landmapper
- Import PolygonFeature from feature.models
- Read taxlots shapefile(s) into DB
- Here's a good example with links to more docs
- SRID is 3857
- Create OpenLayers 2 'control' to send ajax query request on click
- Create view to return geojson (and other attrs, maybe) given x,y coords in 3857 (or 4326 if necessary)
- copy shapefiles locally
- Copy necessary scripts from PEW-EFH
- process_..._grid.sh
- ..._field_map.json
- translate.py
- validate_fields.py
- Update process script and field map to reflect shapefile
- Update model to reflect field map
- Run process script
- Import resulting .sql file
psql -U postgres -d marineplanner -f ../apps/landmapper/data/taxlot_planning_grid.sql