You might be able to do this at the OGC SF level, but it would be awfully cumbersome and inefficient.

This is called "polyogn dissolve" (at least that's what I call it). The usual way to do this is to extract all the line segments from the polygons, load them into a map, extract unique segments (up to orientation), and sew them back together. Often you want to preserve the information about left/right face as well - this adds a further bit of complexity.

JTS has all the basic tools for doing this (most importantly, the PlanarGraph API). But there's no code in it which actually does this specifically.
Rushforth, Peter wrote:
Hi,

I am wondering what the simplest approach to transforming a polygon
layer to a line layer, while ensuring no duplicate lines - ie the
polygon boundaries are rings which touch, in the output I want the
adjacent portions of rings represented by linestrings.
What is the best way to do this with JTS?  Is it at the OGC SF level,
or some lower api level?   Could I do it with just the OGC SF
functions?

Thanks and happy Friday,

Peter Rushforth
Technology Advisor / Conseiller technique
GeoConnections / GéoConnexions
650-615 Booth St. / rue Booth
Ottawa ON K1A 0E9
E-mail / Courriel: [EMAIL PROTECTED] Phone / Télephone: (613) 943-0784 Fax / telecopier: (613) 947-2410
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel


--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to