[Gvsig_english] QUESTION gvSIG 1.9 (BN 1253) -- Corrupted Polygon / Create new polygon using nodes

Simon Cropper scropper at botanicusaustralia.com.au
Fri Jul 2 02:28:35 CEST 2010


On Thursday 01 July 2010 19:02:01 Benjamin Ducke wrote:


> The Topology Extension has numerous tools to deal with such
> data structure problems. If it's installed, then you should
> find something suitable among the tools in the Geoprocessing
> toolbox.
> 
> You could also try importing the polygon into some GIS that
> will swallow it without complaint (have you tried QGIS?),
> then export again as a new Shapefile. Some GIS reorder the
> nodes on writing out the new data.
> 
> But just exactly how each GIS handles the problem is one of
> the darkest secrets in geocomputing...
> 
> Ben

Ben,

For the record the symptom that the polygon was not quite right was that the 
polygon could not be cut in half using the scissor tool while editing - 
nothing happened, no error, no split polygon, nothing.

Tried the topology extension using gvSIG OADE on the original polygon layer 
and nothing was apparent (did this before I posted).

Pushed and pulled the file through everything that could read and write 
shapefiles (QGIS, SAGA, OpenJUMP). Error still occurred.

QGIS has a plugin called Points2One, which took the exploded nodes and linked 
them together again but the problem still occurred. I also know you can take 
exported points and put them in a GML file (in sequence) to define a polygon.

On reviewing the file in ArcView (last resort) I noted that several slivers 
were apparent (as seen by the nodes). I exploded the polygon and deleted both 
and the problem disappeared.

Going pack to gvSIG I tried to reproduce the sequence used in ArcView. On 
exploding the polygon, the bigger of the two small slivers was apparent and 
could be deleted. The problem still occurred, the geometry could not be cut in 
half.

Knowing where the other sliver was I zoomed in and found that gvSIG 
represented this sliver as an overlapping spike from the corner of the larger 
polygon. This dangling node was deleted and the geometry saved. Once this was 
done the geometry was able to be cut.

Tried the topology extension AGAIN and selected every test and behold it 
showed the dangling node (it is amazing how once you know what you are looking 
for you can find it).

So the lessons learnt...
1) when you have a wonky shapefile and use the topology extension select every 
test possible, which is what I thought I did [suggestion would be have tests 
bundled in geometry type and have the ability to select all tests because lets 
face it if you are using the extension to find errors you don't really know 
what you are looking for. Obviously logical tests like no polygons overlap are 
different, I am just talking about things that would cause gvSIG to baulk].
2) Geometries can be converted to points and back again assuming the sequence 
is correct. If an error occurs, this error will be reintroduced when you 
import back into the shapefile format.
3) Nothing currently exists to 'shrink-wrap' around a collection of points. If 
I succeeded in getting this to work I would have noted the dangled node and 
disjunct sliver as the boundary of new polygon would have differed from the 
original one.

-- 
Cheers Simon

	Simon Cropper
	Botanicus Australia Pty Ltd
	PO Box 160 Sunshine 3020
	P: 03 9311 5822. M: 041 830 3437
	W: http://www.botanicusaustralia.com.au


More information about the Gvsig_internacional mailing list