PolygonRectifier?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PolygonRectifier?

Rory Plaire
Greetings,
 
Martin, in the talk "Secrets of JTS" you did at the 2007 FOSS4G, you mentioned a "PolygonRectifier" to fill in for dealing with problematic polygons. I'm interested in something like this myself, since many polygons I encounter are invalid in many and colorful ways, often so bad as to not even allow a Buffer(0.0) to handle them (invalid holes, collapsed holes, repeated points, etc.). I'd like to somehow collect a set of heuristics for dealing with these in some sort of class, maybe like a configurable strategy chain, which is responsible for handling them before they are subsequently passed to Buffer(0.0) for generating a pristine, valid polygon. Have you (or anyone) elaborated any further on "PolygonRectifier" or something like it?
 
thanks,
-rory

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PolygonRectifier?

Martin Davis
Rory,

My original PolygonRectifier work was based handling on a fairly
specific set of errors, so it sounds like it probably wouldn't handle
the spectrum of issues that you're encountering.

Building a strategy chain based on a set of heuristic processes sounds
like a great idea.  I can imagine that this could get a bit complex,
since different kinds of errors would have to be addressed in different
ways, and the sequence of handling them could be critical.  The
PolygonRectifier code would fit into this as one possible heuristic.

For the specific problems you mention (invalid or collapsed holes) this
might not be too hard to do - it should suffice to clean each hole ring
separately, and then recombine them and run a final rectification.  Is
repeated points really an issue?  If so, this should be trivial to clean.

So what are your next steps - cut code?  Or are you looking for someone
to do this for you?

Martin

Rory Plaire wrote:

> Greetings,
>  
> Martin, in the talk "Secrets of JTS" you did at the 2007 FOSS4G, you
> mentioned a "PolygonRectifier" to fill in for dealing with problematic
> polygons. I'm interested in something like this myself, since many
> polygons I encounter are invalid in many and colorful ways, often so
> bad as to not even allow a Buffer(0.0) to handle them (invalid holes,
> collapsed holes, repeated points, etc.). I'd like to somehow collect a
> set of heuristics for dealing with these in some sort of class,
> maybe like a configurable strategy chain, which is responsible for
> handling them before they are subsequently passed to Buffer(0.0) for
> generating a pristine, valid polygon. Have you (or anyone) elaborated
> any further on "PolygonRectifier" or something like it?
>  
> thanks,
> -rory
> ------------------------------------------------------------------------
>
> _______________________________________________
> jts-devel mailing list
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/jts-devel
>  

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

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PolygonRectifier?

Rory Plaire
Thanks Martin -
 
Right - very complex since sequence matters, and handling various outcomes could conceivably form more of a strategy directed (acyclic, hopefully) graph than a chain.
 
You're also right that the indivudual problems are not too difficult, but when they accumulate, it becomes a headache to manage and makes me want a way to solve the problem once so I don't have to keep doing it. The repeated points is less of an issue, since most of the algorithms take care of repeated points, but just an illustration of something that I'd like to plug into the cleaning chain to generate a higher-quality output - it could be offered as some kind of contract for geometries which are constructed based on the input.
 
What specifically does the PolygonRectifer do? What are the inputs/outputs like?
 
It seems like my next step is to put together a rough approach on how this would work and get it running on these simpler cases. I might be able to share the results, and if so, I certainly will.
 
Thanks,
-rory

 
On Tue, Feb 3, 2009 at 2:23 PM, Martin Davis <[hidden email]> wrote:
Rory,

My original PolygonRectifier work was based handling on a fairly specific set of errors, so it sounds like it probably wouldn't handle the spectrum of issues that you're encountering.
Building a strategy chain based on a set of heuristic processes sounds like a great idea.  I can imagine that this could get a bit complex, since different kinds of errors would have to be addressed in different ways, and the sequence of handling them could be critical.  The PolygonRectifier code would fit into this as one possible heuristic.

For the specific problems you mention (invalid or collapsed holes) this might not be too hard to do - it should suffice to clean each hole ring separately, and then recombine them and run a final rectification.  Is repeated points really an issue?  If so, this should be trivial to clean.

So what are your next steps - cut code?  Or are you looking for someone to do this for you?

Martin

Rory Plaire wrote:
Greetings,
 Martin, in the talk "Secrets of JTS" you did at the 2007 FOSS4G, you mentioned a "PolygonRectifier" to fill in for dealing with problematic polygons. I'm interested in something like this myself, since many polygons I encounter are invalid in many and colorful ways, often so bad as to not even allow a Buffer(0.0) to handle them (invalid holes, collapsed holes, repeated points, etc.). I'd like to somehow collect a set of heuristics for dealing with these in some sort of class, maybe like a configurable strategy chain, which is responsible for handling them before they are subsequently passed to Buffer(0.0) for generating a pristine, valid polygon. Have you (or anyone) elaborated any further on "PolygonRectifier" or something like it?
 thanks,
-rory
------------------------------------------------------------------------

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

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

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


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