Hi Martin,

I have added a MakeValid plugin for OpenJUMP and met some difficulties :
1/ I wanted to keep the original coordinate dimension (either 2, 3 or 4) 
by using CoordinateSequence instead of Coordinate.
I could keep coordinate dimension for simple checks on coordinate values 
or coordinate number (point and linestring checks),
but as soon as I use high level functions like union or polygonizer to 
repair invalid polygons, forth dimension seems to be lost.
Is it expected ?

2/ Specification accepts features with duplicate coordinates as valid. 
But high level functions (union, polygonizer), used to
repair invalid polygons, tend to de-duplicate linestrings. Any hint to 
keep the geometry as close as possible to the original ?

3/ My plugin makes 3 kinds of operations
- remove coordinates with NaN x or y
- check number of points (0 or > 1 points for linestrings and 0 or > 3 
points for linear rings)
- union linear components for noding and polygonize to repair invalid 
polygons
Any hint to make it closer to the spec or to improve performance ?
(source code of current function is here : 
http://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/geom/MakeValidOp.java)

Michaël


------------------------------------------------------------------------------
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to