Skip to content

Taxlots As A Model

Ryan Hodges edited this page Jun 28, 2017 · 5 revisions

Taxlots from PostGIS

  1. 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
  2. Read taxlots shapefile(s) into DB
  3. Create OpenLayers 2 'control' to send ajax query request on click
  4. Create view to return geojson (and other attrs, maybe) given x,y coords in 3857 (or 4326 if necessary)

Using Planning Unit Grid Approach

  1. copy shapefiles locally
  2. Copy necessary scripts from PEW-EFH
    • process_..._grid.sh
    • ..._field_map.json
    • translate.py
    • validate_fields.py
  3. Update process script and field map to reflect shapefile
  4. Update model to reflect field map
  5. Run process script
  6. Import resulting .sql file
    • psql -U postgres -d marineplanner -f ../apps/landmapper/data/taxlot_planning_grid.sql

Clone this wiki locally