GeoJson to Topojson conversion.

78 views
Skip to first unread message

Manas Sharma

unread,
Sep 16, 2016, 1:48:40 AM9/16/16
to datameet
Hello,

I have downloaded the districts shapefile of India from the datameet maps repo. I then converted it into GeoJson using ogr2ogr and then into topojson using topojson.

The problem I am facing is that when i try to bind it using D3 to the Mercator projection, the topojson doesn't work while the geojson works. I did try debugging by comparing the original geojson features  and the feature array after the conversion from topojson to geojson feature collection in the code. It has a few features missing from the origninal one. Though I doubt that is the cause of the error.

I am getting the error-
d3.js:7651 Error: <path> attribute d: Expected number, "MNaN,NaNLNaN,NaNL…".

 I suspect this has something to do with projections but am not sure what. Can someone help?

Thanks

Saurabh Datar

unread,
Oct 14, 2016, 5:27:22 PM10/14/16
to datameet
Manas,

Can you share the code? Most likely, you're referencing the wrong object property from the array object that is returned by d3.json()
Reply all
Reply to author
Forward
0 new messages