bcgov / bcdata

An R package for searching & retrieving data from the B.C. Data Catalogue
https://bcgov.github.io/bcdata
Apache License 2.0
81 stars 12 forks source link

Use json format instead of xml for describe_feature #284

Open ateucher opened 2 years ago

ateucher commented 2 years ago

This is probably unnecessarily convoluted, and there is an outputFormat=application/json option that is probably easier to parse than the xml and has more info. There are some differences in the fields however (eg. https://openmaps.gov.bc.ca/geo/pub/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&outputFormat=application/json&typeNames=WHSE_ENVIRONMENTAL_MONITORING.EMS_MONITORING_LOCN_GROUPS_SVW) - notably the GEOEMETRY field is gml:Geometry, whereas the xml output type="gml:GeometryPropertyType". The json has a "local type" which the xml does not.