Wrong attributes when reading shape files with bad LinearRings
--------------------------------------------------------------

                 Key: GEOT-3367
                 URL: http://jira.codehaus.org/browse/GEOT-3367
             Project: GeoTools
          Issue Type: Bug
          Components: data shapefile
    Affects Versions: 2.6.5
         Environment: Mac OS X 10.6.5, Java 1.6.0_22
            Reporter: Marcel Rieser
            Assignee: Andrea Aime


I'm trying to read in a shape file from 
<http://download.geofabrik.de/osm/europe/> (Shapefile-Exports from 
OpenStreetMap), sadly those files contains shapes that produce the error:
 java.lang.IllegalArgumentException: Points of LinearRing do not form a closed 
linestring
     at 
com.vividsolutions.jts.geom.LinearRing.validateConstruction(LinearRing.java:105)
When I try to try-catch those exceptions to at least read in all the other 
shapes, the attributes begin to mismatch: The attributes for the 
non-closed-shape are returned with the next closed-shape. It looks like there 
are two different Iterators (one for the shape, one for the attributes), and in 
the case of the exception only the first one get's forwarded, but not the one 
for the attributes.

Is there any way to disable the LinearRing-Validation completely? Other 
GIS-Applications (e.g. QGis) happily work with those shapefiles, only 
GeoTools/uDig has problems with those.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to