ShapefileReader problem

62 views
Skip to first unread message

Gonzalo

unread,
Jan 16, 2012, 2:54:16 PM1/16/12
to NetTopologySuite
Hello All,

I tried to read a shapefile that contains about 100 polylines by using
the ShapefileReader class.
Unfortunately, a few polylines have only one point defined.
The ReadAll method imports correctly the polylines until if finds the
first one-point polyline.
Is there any way that the method can skip these wrong polylines and
continue reading the rest of them?

Thanks in advance.

FObermaier

unread,
Jan 17, 2012, 2:10:26 AM1/17/12
to NetTopologySuite
Not without changing the code to
- duplicate the one coordinate to have two?
- convert to empty LineString
- skip LineString
What would you prefer?

Please raise an issue on the projects issue tracker and provide a
sample file.
FObermaier

Diego Guidi

unread,
Jan 17, 2012, 2:22:29 AM1/17/12
to nettopol...@googlegroups.com
> What would you prefer?
If I'm right, a shapefile like this is an invalid shapefile, so NTS
should raise an exception (as I think it does).
With programs like qgis, gvsig or arcgis the shapefile is readed?
Reply all
Reply to author
Forward
0 new messages