[postgis-users] Topological editing with OpenLayers

Rémi Cura remi.cura at gmail.com
Fri Jan 3 07:51:50 PST 2014


Hey,
you seem to mix 2 different things.

_You can do what you want using the regular postgis function
You would write a trigger on your polygon column, os that on update, you
also update other touching polygons (you would need to do polygon breanking
into lines, which may become difficult if you have inner ring).
Sorry to say that this may not be a good idea to use this as a topological
model (a lot of data duplication, non standart topology model)

_You can do what you want (with a tweak) with postgis topology
In postgis topology you have shared lines and points, then polygons are
defined upon those (like : edge 23 then edge 43 then edge 46 form the
polygon 1)
So out of the box, when modifying a shared line, all surfaces are
implicitly modified.
The small problem you may have is that the surfaces are computed each time
you need it, which is slower than just store it like a polygon.

If you need some precision about the data model behind postgis topology :
http://trac.osgeo.org/postgis/wiki/PostgisTopology_Data_Model

Cheers,
Rémi-C


2014/1/3 Jan Hartmann <j.l.h.hartmann at uva.nl>

>  Hi all,
>
> I have written a simple OpenLayers-application to edit a PostGIS polygon
> layer: read one polygon from the server as GeoJSON, adapt it interactively,
> and write it back again via GeoJSON. Points are only moved, not created or
> deleted.
>
> The polygon layer is topologically correct: all adjoining polygons share
> the same points. With QGIS I can choose "topological editing", to
> automatically move corresponding points from adjoining polygons. With the
> GeoJSON application that is not possible: whenever I move a boundary point
> of one polygon, the corresponding points on adjoining polygons remain where
> they are.
>
> Is it possible with the new topology methods in PostGIS to write the
> following update procedure: whenever a changed polygon is written back into
> the database, all corresponding points on neighbouring polygons will be
> looked up and changed as well? I guess I would need some sort of pointer
> for all boundary points to all other boundary points that share the same
> location.
>
> Jan
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140103/2007dd39/attachment.html>


More information about the postgis-users mailing list