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’m facing this issue: I have a chloropleth map based on a set of polygons with some data. Using WFS-T (postgis, geoserver, openlayers) I am able to edit the geometry of the polygons. This works fine.

My polygons look like state borders. They have shared border vertices. When I edit the geometry of some polygon (e.g., move vertices using modifyFeature), I need to affect the geometry of any neighboring polygon. There shouldn’t be holes or overlaps.

Is it possible to do it?

Thanks

share|improve this question
    
Probably ;) I don't believe OpenLayers supports anything like this out of the box, but it would be implementable. You could represent each border with a linestring, and modify the linestrings. Then, when the linestring gets updated, you update the two (or more) polygons which touch at the border, removing the old border and inserting the new one. –  canisrufus Aug 5 '11 at 13:27
add comment

2 Answers 2

Only clues, don't think OpenLayers is able to do it. Most open source Desktop GIS are not able to do snapping on a line of differents vertex so doing this online seems for me a dream.

For simple geometry, the snapping can be enough http://openlayers.org/dev/examples/snapping.html Not enough mature, I hope https://github.com/bjornharrtell/jsts will be a way to do intersection (and indirecly solve your problem) on client side before sending back content. For the moment, I will think more about processing after drawing using PostGIS triggers for this and send back corrected draws. Topology implementation in PostGIS may help http://www.postgresql-sessions.org/2/sandro_santilli_-_topology_with_postgis_2.0 Always on server side, see possibilities of WPS maybe http://community.esdi-humboldt.eu/documents/show/4

share|improve this answer
add comment

I know that this question is 3 years old, but I think it will help future people reading this subject.

You can find an OpenLayers implementation of topology here: http://dev.openlayers.org/sandbox/bjornharrtell/eventbasedtopology2/examples/topology.html

share|improve this answer
add comment

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.