You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR: I performed the following experiment which creates an osmtogeojson installation and uses it to create both a node and browser based osm to geojson transform.
They differ with the browser version apparently not placing the osm tags directly into the feature properties object.
Details:
The methodology proceeds like this, using the overpass api to create a osm file for part of santa fe new mexico, and then use osmtogeojson to create the associated geojson.
At this point we have an osm file and the associated node based json.
Next I run the osm.html file included in the attached zip. It uses a script tag for osmtogeojson.js (I used two version, one from ./node_modules, the other from unpkg.com CDN).
The html mainly runs code to import the node geojson, and to create a browser version of the geojson.
Opening the console gives access to the two geojson objects, "chrome" and "node", in the window global object. Two "samples" are printed out to show the same feature, showing how they differ. Primarily the properties objects differ.
Whew! I hope this is not too complicated. I'm loving osmtogeojson, it's superb! I discovered the issue via #108 so hope to see a lot of osmtogeojson in browsers!
The text was updated successfully, but these errors were encountered:
TLDR: I performed the following experiment which creates an osmtogeojson installation and uses it to create both a node and browser based osm to geojson transform.
They differ with the browser version apparently not placing the osm tags directly into the feature properties object.
Details:
The methodology proceeds like this, using the overpass api to create a osm file for part of santa fe new mexico, and then use osmtogeojson to create the associated geojson.
mkdir osm; cd osm
npm init -y
npm install osmtogeojson
curl "https://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%5Btimeout%3A180%5D%5Bbbox%3A35.67514743608467%2C-105.9521484375%2C35.6929946320988%2C-105.93017578125%5D%3B%0Away%5Bhighway%5D%3B%0A(._%3B%3E%3B)%3B%0Aout%3B" > santafe.osm
./node_modules/osmtogeojson/osmtogeojson < santafe.osm > santafe.json
At this point we have an osm file and the associated node based json.
Next I run the osm.html file included in the attached zip. It uses a script tag for osmtogeojson.js (I used two version, one from ./node_modules, the other from unpkg.com CDN).
The html mainly runs code to import the node geojson, and to create a browser version of the geojson.
Opening the console gives access to the two geojson objects, "chrome" and "node", in the window global object. Two "samples" are printed out to show the same feature, showing how they differ. Primarily the properties objects differ.
I've made the files available on:
http://backspaces.net/temp/osm/
and
http://backspaces.net/temp/osm.zip
and the osm.html can be run by
http://backspaces.net/temp/osm/osm.html
Whew! I hope this is not too complicated. I'm loving osmtogeojson, it's superb! I discovered the issue via #108 so hope to see a lot of osmtogeojson in browsers!
The text was updated successfully, but these errors were encountered: