[GIS] District border join in Google maps

bordersjavascript

I am developing a district editor for cities. The idea is that we divide the city into districts. I am using GoogleMaps, but any other js library is acceptable.

Problem 1: districts are connected polygons, so changing one's border changes it's neighbour. I can not imagine a simple interface to join the polygons, and the ones, that I can think of are hard to implement (like sticky borders idea where borders 'stick' together when are near and 'unstick' when stretched far away.)

Question: Is there some library or an example of an Editor that can join Polygons, and changing one's border changes the neighbour? (Even non web examples would be of use to give me an idea of the user interface.)

Problem 2: I have a dataset based on data from wikimapia, that contains district polygons. Problem is that those polygons do not join by points and somehow overlap or have space between them.

Question: How can I process those polygons to gain ones, that have joined borders. I can use Python scripts or any other if needed instructions are provided. This is a one time operation, no need to implement a graceful solution.

Example of wikimapia dataset visualization

Best Answer

This is a slightly old question, but here is my Answer:

There is a wonderful Library called d3, which has been recently been used for a lot of GIS webMapping with vectors.

One of the best sites, that shows its capabilities, is OpenStreetMap's iD editor. You can also have topological editing in d3.

You can find many question about usage of d3, on this site itself. Here is a search result, which can get you started: https://gis.stackexchange.com/search?q=D3+is%3Aquestion

This is a good tutorial, to get started: http://bost.ocks.org/mike/map/

Related Question