[geos-devel] Re: WKB parser

strk strk at keybit.net
Thu May 5 11:15:59 EDT 2005


I answer on geos-devel as I think community should be able to
partecipate in this.

On Fri, Apr 29, 2005 at 05:29:47PM -0700, Martin Davis wrote:
> I don't think normalize is what you want to be looking at.
> 
> This was an issue with WKT as well - the SFS doesn't specify a format
> for LinearRings. I just went ahead and made up my own. I guess we could
> do the same thing for WKB too - what do you think?  Or we could just say
> that LinearRings are not supported by WKB  (not such a good decision, I
> guess).

I'm afraid that the presence of LINEARRING in GEOS-extended WKT is
all my fault, and I'm sorry about it :(

We shouldn't have done it, as ogc tests were failing for exactly
this reason. A LINEARRIN is a LINESTRING at all effects, why bothering
with a new definition ? It is ok to have a derivation in an OO
hierarchy as it can help encoding constraints in calls such as
polygon constructors, but I think exporing this in WKT was
a wrong choice. I wouldn't do it again, so I vote for WKB
representation of a LINEARRIN *is* a LINESTRING.

Other thoughts ?

--strk;

> 
> Martin Davis, Senior Technical Architect
> Vivid Solutions Inc.      www.vividsolutions.com
> Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
> Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> 
> 
> > -----Original Message-----
> > From: strk [mailto:strk at keybit.net] 
> > Sent: April 29, 2005 8:26 AM
> > To: Martin Davis
> > Cc: Paul Ramsey
> > Subject: Re: WKB parser
> > 
> > 
> > Ok, I've been lame. It's compareTo() as used by XMLTester. 
> > Anyway there's another problem. Input geometries can be 
> > LINEARRING, while output geometries (as parsed by WKB output 
> > of input geometry) will become LINESTRING. The normalize() 
> > method of geoms doesn't take care of this. Should it in your opinion ?
> > 
> > --strk;
> > 
> > On Fri, Apr 29, 2005 at 04:15:43PM +0200, strk wrote:
> > > I've about done with the WKB parser code.
> > > In order to test it I need a function to test vertex-by-vertex 
> > > equality of geometries, to compare input and output ( INPUT -> 
> > > WKBWrite -> WKBRead -> OUTPUT).
> > > 
> > > What function should I use ?
> > > Is anything similar in JTS ?
> > > (sorry if I'm being lame)
> > > 
> > > --strk;
> > 



More information about the geos-devel mailing list