Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?

Download and convert data from NYC open data portal

curl -o ""
cd nynta_12c

ogr2ogr can't deal with the projection directly. Replace content of nynta.prj with the following projection string:


Then reproject and simplify using ogr2ogr

ogr2ogr -f "GeoJSON" -s_srs nynta.prj -t_srs EPSG:4326 -simplify 10 nycneighborhoods.geojson nynta.shp

Now copy the JSON object of nycneighborhoods.geojson into nycneighborhoods.js so that var neighborhoods = <contentsofnycneighborhoods.geojson>;.


ghost commented Jul 7, 2014

Hi Ixbarth!

I have followed an example over at ( where they use your technique for fixing the GeoJson-file into the right format. My problem now is that I have a shapefile for the different areas in Stockholm, Sweden instead, and try to use the tutorial over at mapbox. Unfortunately I can't get it right and wonder if you have any set-up tips for different shapefiles?

Thank in advance!

happen to still have this geojson? ogr2ogr messes up for me for whatever reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment