NMWDI / pygeoapi_config

1 stars 1 forks source link

Geoconnex stage 3: Topological connections #3

Closed ksonda closed 4 years ago

ksonda commented 4 years ago

The Water Data Challenge use case includes the following boundary files that are higher-resolution versions of reference features in info.geoconnex.us:

data url
boundary_state https://catalog.newmexicowaterdata.org/dataset/c1458772-e729-4230-9236-41297ffacfd8/resource/23403858-ba49-4c48-a7f4-c819412308ed/download/new_mexico_bnd_geojson.zip
boundary_places https://catalog.newmexicowaterdata.org/dataset/497d5e2c-20c7-4f8e-b50b-fe6f11cc7465/resource/9bda3ab1-a436-428e-ba5d-357cdebd6cfd/download/tl_2015_35_place_geojson.zip
boundary_county https://catalog.newmexicowaterdata.org/dataset/e7256310-19c5-4103-ae01-60a8e5936f95/resource/f1a0c42b-3f2a-424c-8761-16567e840983/download/tl_2018_nm_county_geojson.zip
boundary_huc8 https://catalog.newmexicowaterdata.org/dataset/a2f9a261-c2c1-437b-8779-6a4cabe030f6/resource/916112de-f146-4d22-98c5-f45ea83bf2d8/download/wbdhu8_a_nm_geojson.zip

We should tag every well in wells.gpkg with the state, place, county, and huc8 they are in. Probably have to do some st_intersect or whatever you like to do in python.

Then, the following fields can be added to wells.gpkg:

state with the relevant reference geoconnex pid for that state: https://geoconnex.us/ref/states/{FIPS} (NM FIPS is 35) place with the relecant reference geoconnex pid for that place: https://geoconnex.us/ref/places/{GEOID} county with county geoconnex pid : https://geoconnex.us/ref/counties/{5-digit FIPS or GEOID} huc8 with huc8 geoconnex pid: https://geoconnex.us/ref/hu08/{8-digit code} .

Then, the semantics can be added to the context: part of wdi.config.yml:

context:
      - state: https://schema.org/geoWithin
      - place: https://schema.org/geoWithin
      - county: https://schema.org/geoWithin
      - huc8: https://schema.org/geoWithin

Restart pygeoapi and ready to go!

jirhiker commented 4 years ago

started addressing this issue.

topo connections are set during construction of each geojson feature from the ST Locations response.