Closed gmaclennan closed 3 years ago
Thanks for the very helpful review @noffle. A lot of the suggestions relate to code that I copied from other tests; at some point we should clean up the mapeo core tests, but I don't think it's urgent. I did notice that actual and expected are the wrong way round in lots of tests, which is confusing initially when you get a failing test.
Regarding the package-lock.json
, see https://github.com/digidem/mapeo-core/pull/108#issuecomment-731640568.
This adds a new method
mapeo.createDataStream()
which returns a ReadableStream of OSM data in Mapeo as either GeoJSON or a Shapefile.This is similar functionality to the current
mapeo.exportData()
method, but it returns a stream rather than writing directly to a file.It accepts
opts.filter
which can be amapeo-entity-filter
: an array that defines a filter for OSM objects in Mapeo. This is most useful for filtering data based on the value of certain tags on the data, e.g. to only export data of a certain type.This is necessary for the WCMC work, for which we want to filter only data with the tag
protection_title
equal toicca
. This would be written as:Next steps: