Pregunta

I have been recently taking a look at kartograph. I understand that we generate the svg with kartograph.py and then use the svg in kartograph.js to render maps in a web interface.

I want to generate something like this http://kartograph.org/showcase/animated-symbols/. But using world map instead. The problem is I am very new to mapping and geo data. Its super difficult for me to find how to generate a svg only with country outlines using kartograph.py.

There is an example to test kartograph.py which generates a world map svg but its close to 2MB in size. Is this normal? Wont it delay the initial loading of the graph with a 2 MB svg ( atleast in poor internet connection).

Also the example uses some .shp files to draw the map, where can i get those files.

In other simple words, I am trying to find a simple end to end example to how to use kartograph, but it looks like one such thing is not available.I have googled for several times and just returned empty handed.

any pointers on how to generate the a simple world map with country outlines and what are layers, filters and explanation of few terms to get me started will be very helpful. Thanks in advance

¿Fue útil?

Solución 2

I wrote a blog post myself on how to get started with Kartograph. This blog post is available here http://vumaasha.github.io/codehook/kartograph/geomapping/2013/11/24/using-kartograph.html. I hope this will be helpful for people who are new to Kartograph and gis stuff that it is related to

Otros consejos

Yes, 2MB is probably too much. In yuor config parameter you can add "simplify": xxx to reduce the size of the output file. You will have to experiment with hat to find a good balance between quality and size!

As for the .shp files, they are called “shapefiles”, and is a standard format for describing geographical features. They are basically the stuff you make maps from. There are plenty of places out there where you can find shapefiles, e.g. www.diva-gis.org. You will probably want to learn how to use a tool like QGIS to manipulate those files.

Good luck!

There are plenty of places to get the shapefiles:

Here's a great consolidated source: http://freegisdata.rtwilson.com/

There are also many good tools for simplifying the shapefiles before you export your maps.

This is the fastest and easiest to use shape file optimizer I've seen. This online tool that will import shapefiles, GeoJSON or TopoJASON, and export them in simplified form (also in any of those formats). http://www.mapshaper.org With it, you can instantly see what your optimized shapes will look like, with significant size reduction.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top