Hi,
Thank you for the answers about this topic.
ShapefileReader is not great but it just works.
I'll see what I can do to improve PolygonHandler a bit (following
Martin's and Larry's recommendations).
Moving to a recent geotools driver is another option which, I think,
needs more work and more t
BTW, the original thread is archived here:
http://www.mail-archive.com/jump-pilot-devel@lists.sourceforge.net/msg04403.html
Larry
On Mon, May 11, 2009 at 3:57 PM, Larry Becker wrote:
> When I last worked on the issue that is the topic of this thread (last year
> sometime), I tried to use the geo
When I last worked on the issue that is the topic of this thread (last year
sometime), I tried to use the geotools code to solve the problem, but it
seemed to be buggy so I abandoned it. I don't recall anything specific, but
I did make the effort.
regards,
Larry
On Mon, May 11, 2009 at 3:49 PM,
if the current geotools (just checked they are 2.5.5 stable now)
shapefile reader/writer is more advanced why not aiming on using it .. i
once wrote a geotools reader/writer extension, that should be possible
these days as well ... only problem was that I had to convert the data
structure because i
Michaël Michaud wrote:
> Hi,
>
> As I tried to fix a bug in PolygonHandler (see end of e-mail), I noticed
> some other strange pieces of code in this class.
>
>
The ShapefileReader code is really horrific, IMHO. We grabbed it from
an early release of GeoTools, and never upgraded it since it
Michaël Michaud wrote:
>
> line 170 if(points.length == 0 || points.length > 3){
> I don't understand why 1 and 2 points rings are filtered and not 0 point
> rings, but it may be necessary to hold some kind of empty geometries
>
Yes, 0 points are allowed to support empty geometries.
--
Mart
Hi Michaël,
line 218 CGAlgorithms.isPointInRing(jPt, coordList) ||
> pointInList(jPt,coordList)
>
The second test is just paranoia that isPointInRing is not robust for
non-fixed point math. I haven't scanned the jts code to see what it
actually does.
@Larry : I replaced a quick 'ring in ring' t
Hi,
As I tried to fix a bug in PolygonHandler (see end of e-mail), I noticed
some other strange pieces of code in this class.
I'd like to clean it a bit, but it is a very useful class and I don't
want to break a working code.
If Larry or somebody else would be kind enough to check the following