Add an option to directly load csv data with coordinates as layer with point features.
Also allowing filtering the the data from csv before internally create the features.
As this change is based on the geojson logic and settings you can also activate search for the generated features here.
Most used CSV parser (also @fast-csv/parse, was already in source) are for node runtime and would need pollyfill for node-stream to work in web.
Therefore I add uDSV.
It's not as much used, but is small and work as expected on my tests.
If you planned to add stream pollyfill anyway.
The parse logic in
GeoJSONService.fetchCsvData
could be changed to:
Add an option to directly load csv data with coordinates as layer with point features. Also allowing filtering the the data from csv before internally create the features.
As this change is based on the geojson logic and settings you can also activate search for the generated features here.
This function was designed to have a possibility for an offline search for places, and use the "swissNAMES3D_PLY.csv" from https://www.swisstopo.admin.ch/en/landscape-model-swissnames3d (with filtering for "OBJEKTKLASSE_TLM" = "TLM_SIEDLUNGSNAME")
It is based on geojson update https://github.com/zskarte/zskarte-client/pull/417
some words to CSV parsing
Most used CSV parser (also @fast-csv/parse, was already in source) are for node runtime and would need pollyfill for node-stream to work in web. Therefore I add uDSV. It's not as much used, but is small and work as expected on my tests. If you planned to add stream pollyfill anyway. The parse logic in GeoJSONService.fetchCsvData could be changed to: