Questions tagged [topojson]

TopoJSON is an extension of GeoJSON that encodes topology. TopoJSON eliminates redundancy, offering much more compact representations of geometry than with GeoJSON; typical TopoJSON files are 80% smaller than their GeoJSON equivalents. In addition, TopoJSON facilitates applications that use topology, such as topology-preserving shape simplification, automatic map coloring, and cartograms.

TopoJSON is an extension of GeoJSON that encodes topology.

Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs. TopoJSON eliminates redundancy, offering much more compact representations of geometry than with GeoJSON; typical TopoJSON files are 80% smaller than their GeoJSON equivalents. In addition, TopoJSON facilitates applications that use topology, such as topology-preserving shape simplification, automatic map coloring, and cartograms.

Topojson toolkits has seen major changes at v.2, as of April 2017 :

  • Topojson Specification
  • Topojson v1 - CLI
  • Topojson v2,v3 -- An extension of GeoJSON that encodes topology! Calls :
    • topojson-client (3.0.0) : Manipulate TopoJSON, such as to merge shapes, and convert it back to GeoJSON
    • topojson-server (3.0.0) : Convert GeoJSON to TopoJSON.
    • topojson-simplify (3.0.0) : Filter and simplify geometries while preserving topology for smaller files and faster rendering!
611 questions
0
votes
1 answer

How to read geojson file using TopoJSON

I am working to resize the json file that I have automatically after reading json file. But I am getting errors. $.getJSON("data/cities.json", function (data) { getData = topojson.feature(data, data.features); console.log( getData) …
user3378649
  • 5,154
  • 14
  • 52
  • 76
0
votes
0 answers

Scaling and transforming text in d3

My question concerns this example: http://bl.ocks.org/mbostock/4699541 And this bit of code: var b = path.bounds(d); g.transition().duration(750).attr("transform", "translate(" + projection.translate() + ")" + "scale(" + .95 / Math.max((b[1][0]…
Keith Collins
  • 252
  • 1
  • 3
  • 9
0
votes
1 answer

Leaflet choropleth - geoJSON style colors not appearing unless hovered

I'm developing an interactive choropleth map with Leaflet.js using a geoJSON base layer and symbolizing polygons with JSON data pulled from a Socrata API endpoint. It's based on the Leaflet.js choropleth example posted here. I'm stumped on one…
Eli Kern
  • 319
  • 1
  • 3
  • 12
0
votes
1 answer

D3: Messed up coordinates with Cartogram.js

Following the tutorial of Jeff Fletcher (http://www.limn.co.za/2013/10/making-a-cartogram/) I've been trying to build a Cartogram.js map of Europe. I'm able to render the initial map, but when I do the transitions the coordinates get messed up. The…
Jens
  • 121
  • 1
  • 9
0
votes
1 answer

How to translate and wrap d3.js world map 2D projection

We have a project where we would like to display a vector map, but offset the centre from the meridian so that Asia is more central. I can use d3.geo.equirectangular().center([-155.0, 0]) to translate the map, but there is (obviously) no wrapping,…
skila
  • 69
  • 5
0
votes
1 answer

d3.js topojson based choloropleth map for 170 countries . Show specific country map on selection

I need to display no of orders/revenue/sales etcc in d3.js topojson based chloropleth map for 170 countries at county/state level . the user is allowed to select country from dropdown and corresponding country chloropleth map should be displayed…
Alvin Pradeep
  • 618
  • 4
  • 13
0
votes
1 answer

D3.js : Draw a new topojson and removing the old one

I am new to d3.js, but I could draw a topojson file, centering and calculate the scale (obviously using several questions and answers of stackoverflow). Now, I want to change the topojson displayed, I mean, delete the actual, and load a new one and…
nanounanue
  • 7,942
  • 7
  • 41
  • 73
0
votes
0 answers

Update data source for D3 TopoJSON map

I am currently attempting to update the data source for a TopoJson map so that the points on the map get replotted when a button is pressed / updateData() function is called. Here is my code:
Tom Whitaker
  • 117
  • 3
  • 10
0
votes
1 answer

Dynamically size points on D3 TopoJSON map

I have plotted points on a TopoJSON map using D3, with the following code: