Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I currently have a coordinate based map of the US and it's states for topojson (https://github.com/mbostock/topojson).

The coordinates are a JSON array (as topojson works), data looks like this:

[-123.233256,42.006186], [-122.378853,42.011663]...

Now what I'd like to do is combine states into regions, outside of doing this by hand (and that idea makes me feel sick), are there any tools which I can use to accomplish this?

I have QGIS but have no clue where to even start (let alone how to combine states in QGIS).

share|improve this question
1  
So it sounds like you are trying to "merge features", but with a source topojson file, correct? –  RyanDalton Sep 12 '13 at 19:42
    
Correct! I can do this in inkscape with the SVG, but obviously that is post-projection. :( I'm assuming I may have to get the original maps for QGIS and do it there? I can't seem to go from topojson > QGIS. –  StrangeWill Sep 12 '13 at 20:12

2 Answers 2

up vote 4 down vote accepted

You can use topojson.mesh to do this, as shown in bl.ocks.org/5416405:

merging states

There are a few limitations to this approach (such as its dependence on an exact topology and lack of detection of holes), but it might for you as-is or with a few adjustments.

There’s also the simpler approach of drawing the set of polygons for each region twice, once with a stroke and once with a fill, as shown in bl.ocks.org/5416440:

merging states ii

See also a very similar question on Stack Overflow.

share|improve this answer
    
Awesome, got this implemented in very little amount of time. Thanks and works fine without adjustments. Guess I need to dig at topojson's docs more, it's quite powerful. –  StrangeWill Sep 13 '13 at 18:41

The problem is that, for the moment, QGIS does not recognize the TopoJSON format (too recent). The solution is to transform the TopoJSON file into GeoJSON format:

and you can import the GeoJSON file in QGIS

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.