Note that there are some explanatory texts on larger screens.

plurals
  1. POconvert shp to topoJSON failing
    primarykey
    data
    text
    <p><strong>GIS to Topojson:</strong></p> <p>I'm using <a href="http://diva-gis.org/" rel="nofollow">DIVA-gis.org</a> for my data source. I've downloaded the data for Armenias administrative areas. This dowload produces a .shp file. I've tried to pass it directly to topoJSON and I get a json file as follows<br></p> <pre><code>Object { type: "Topology", objects: Object, arcs: Array[1], transform: Object } </code></pre> <p><strong>Topojson to SVG:</strong></p> <p>I'm pointing d3 to objects.armenia which contains my geometries property. The problem is that that geometries property contains an array of arcs which is 0. Now within my topoJSON of armenia I do see an arcs property array that contains quite a big array of values... I've tried pointing my d3 code to that element but I still get nothing.<br> Aside from that I've also used QGIS to convert my .shp file into geoJSON and them use topoJSON to go from geoJSON from topoJSON... but still nothing. My d3 code is as follows<br></p> <pre class="lang-js prettyprint-override"><code>var width = 960, height = 500; var projection = d3.geo.mercator() .scale(1000) .translate([width / 2, height / 2]); var path = d3.geo.path() .projection(projection); var mapContainer = d3.select("#armenia").append("svg") .attr("width", width) .attr("height", height); d3.json("/ARM_adm/output.json", function(error, country) { console.log("country",country) mapContainer.insert("path", ".graticule") .datum(topojson.feature(country, country.armenia)) .attr("class", "land") .attr("d", path); }); </code></pre> <p>I simply get an empty path... any help would be much apreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload