jeffpaine / geojson-topojson Goto Github PK
View Code? Open in Web Editor NEWA simple (perhaps dumb) web interface to quickly convert between GeoJSON and TopoJSON.
Home Page: http://jeffpaine.github.io/geojson-topojson/
License: MIT License
A simple (perhaps dumb) web interface to quickly convert between GeoJSON and TopoJSON.
Home Page: http://jeffpaine.github.io/geojson-topojson/
License: MIT License
Fix ==
comparison at https://github.com/JeffPaine/geojson-topojson/blob/gh-pages/index.html#L142
For some reason, switching it to ===
causes an error.
Looks like we can use browserify to take advantage of topojson's node server API
When I convert geoJSON to topoJSON feature's properties disappear.
You can try this json:
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"timezone":-12},"geometry":{"type":"Polygon","coordinates":[[[-180,-89],[-180,89],[-165.6,89],[-165.6,-89],[-180,-89]]]}},{"type":"Feature","properties":{"timezone":-11},"geometry":{"type":"Polygon","coordinates":[[[-165.6,-89],[-165.6,89],[-151.2,89],[-151.2,-89],[-165.6,-89]]]}},{"type":"Feature","properties":{"timezone":-10},"geometry":{"type":"Polygon","coordinates":[[[-151.2,-89],[-151.2,89],[-136.8,89],[-136.8,-89],[-151.2,-89]]]}},{"type":"Feature","properties":{"timezone":-9},"geometry":{"type":"Polygon","coordinates":[[[-136.8,-89],[-136.8,89],[-122.4,89],[-122.4,-89],[-136.8,-89]]]}},{"type":"Feature","properties":{"timezone":-8},"geometry":{"type":"Polygon","coordinates":[[[-122.4,-89],[-122.4,89],[-108,89],[-108,-89],[-122.4,-89]]]}},{"type":"Feature","properties":{"timezone":-7},"geometry":{"type":"Polygon","coordinates":[[[-108,-89],[-108,89],[-93.6,89],[-93.6,-89],[-108,-89]]]}},{"type":"Feature","properties":{"timezone":-6},"geometry":{"type":"Polygon","coordinates":[[[-93.6,-89],[-93.6,89],[-79.19999999999999,89],[-79.19999999999999,-89],[-93.6,-89]]]}},{"type":"Feature","properties":{"timezone":-5},"geometry":{"type":"Polygon","coordinates":[[[-79.2,-89],[-79.2,89],[-64.8,89],[-64.8,-89],[-79.2,-89]]]}},{"type":"Feature","properties":{"timezone":-4},"geometry":{"type":"Polygon","coordinates":[[[-64.8,-89],[-64.8,89],[-50.400000000000006,89],[-50.400000000000006,-89],[-64.8,-89]]]}},{"type":"Feature","properties":{"timezone":-3},"geometry":{"type":"Polygon","coordinates":[[[-50.400000000000006,-89],[-50.400000000000006,89],[-36,89],[-36,-89],[-50.400000000000006,-89]]]}},{"type":"Feature","properties":{"timezone":-2},"geometry":{"type":"Polygon","coordinates":[[[-36,-89],[-36,89],[-21.599999999999994,89],[-21.599999999999994,-89],[-36,-89]]]}},{"type":"Feature","properties":{"timezone":-1},"geometry":{"type":"Polygon","coordinates":[[[-21.599999999999994,-89],[-21.599999999999994,89],[-7.199999999999989,89],[-7.199999999999989,-89],[-21.599999999999994,-89]]]}},{"type":"Feature","properties":{"timezone":0},"geometry":{"type":"Polygon","coordinates":[[[-7.199999999999989,-89],[-7.199999999999989,89],[7.200000000000017,89],[7.200000000000017,-89],[-7.199999999999989,-89]]]}},{"type":"Feature","properties":{"timezone":1},"geometry":{"type":"Polygon","coordinates":[[[7.200000000000017,-89],[7.200000000000017,89],[21.600000000000023,89],[21.600000000000023,-89],[7.200000000000017,-89]]]}},{"type":"Feature","properties":{"timezone":2},"geometry":{"type":"Polygon","coordinates":[[[21.599999999999994,-89],[21.599999999999994,89],[36,89],[36,-89],[21.599999999999994,-89]]]}},{"type":"Feature","properties":{"timezone":3},"geometry":{"type":"Polygon","coordinates":[[[36,-89],[36,89],[50.400000000000006,89],[50.400000000000006,-89],[36,-89]]]}},{"type":"Feature","properties":{"timezone":4},"geometry":{"type":"Polygon","coordinates":[[[50.400000000000006,-89],[50.400000000000006,89],[64.80000000000001,89],[64.80000000000001,-89],[50.400000000000006,-89]]]}},{"type":"Feature","properties":{"timezone":5},"geometry":{"type":"Polygon","coordinates":[[[64.80000000000001,-89],[64.80000000000001,89],[79.19999999999999,89],[79.19999999999999,-89],[64.80000000000001,-89]]]}},{"type":"Feature","properties":{"timezone":6},"geometry":{"type":"Polygon","coordinates":[[[79.19999999999999,-89],[79.19999999999999,89],[93.59999999999997,89],[93.59999999999997,-89],[79.19999999999999,-89]]]}},{"type":"Feature","properties":{"timezone":7},"geometry":{"type":"Polygon","coordinates":[[[93.60000000000002,-89],[93.60000000000002,89],[108,89],[108,-89],[93.60000000000002,-89]]]}},{"type":"Feature","properties":{"timezone":8},"geometry":{"type":"Polygon","coordinates":[[[108,-89],[108,89],[122.39999999999998,89],[122.39999999999998,-89],[108,-89]]]}},{"type":"Feature","properties":{"timezone":9},"geometry":{"type":"Polygon","coordinates":[[[122.40000000000003,-89],[122.40000000000003,89],[136.8,89],[136.8,-89],[122.40000000000003,-89]]]}},{"type":"Feature","properties":{"timezone":10},"geometry":{"type":"Polygon","coordinates":[[[136.8,-89],[136.8,89],[151.2,89],[151.2,-89],[136.8,-89]]]}},{"type":"Feature","properties":{"timezone":11},"geometry":{"type":"Polygon","coordinates":[[[151.2,-89],[151.2,89],[165.59999999999997,89],[165.59999999999997,-89],[151.2,-89]]]}},{"type":"Feature","properties":{"timezone":12},"geometry":{"type":"Polygon","coordinates":[[[165.60000000000002,-89],[165.60000000000002,89],[180,89],[180,-89],[165.60000000000002,-89]]]}}]}
Thanks for feedback!
Right now, when converting TopoJSON to GeoJSON, we only convert objects under <objectName>.objects.collection
. It would be better to handle it more intelligently or perhaps via user configuration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.