Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-12 Thread Justin Deoliveira
Yup, this looks great to me. On Wed, Jun 12, 2013 at 12:32 PM, Andrea Aime wrote: > On Wed, Jun 12, 2013 at 4:29 PM, Justin Deoliveira > wrote: > >> Its important to note that on the encoding side the type/element qname >> declared by the binding is only used if there is type in the context whi

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-12 Thread Andrea Aime
On Wed, Jun 12, 2013 at 4:29 PM, Justin Deoliveira wrote: > Its important to note that on the encoding side the type/element qname > declared by the binding is only used if there is type in the context which > is often not there for encoding (think encoding a straight feature > collection without

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-12 Thread Justin Deoliveira
On Tue, Jun 11, 2013 at 2:46 AM, Andrea Aime wrote: > On Tue, Jun 4, 2013 at 3:30 PM, Justin Deoliveira wrote: > >> I see, so a generic binding for LineString that would then do some >> typechecks and delegate to the proper >> >>> subclasses? My worry is, at that point, isn't the element used for

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-11 Thread Andrea Aime
On Tue, Jun 4, 2013 at 3:30 PM, Justin Deoliveira wrote: > I see, so a generic binding for LineString that would then do some > typechecks and delegate to the proper > >> subclasses? My worry is, at that point, isn't the element used for >> encoding pretty much cast in stone? >> > > Yeah, the bind

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-04 Thread Justin Deoliveira
On Mon, Jun 3, 2013 at 8:23 AM, Andrea Aime wrote: > On Mon, Jun 3, 2013 at 4:16 PM, Justin Deoliveira wrote: > >> >> Am I missing something? Having a CircularString extends MultiLineString >>> and Ring extends LinearRing is >>> not going to be the end of the world, but I'd like to see if there ar

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-03 Thread Andrea Aime
On Mon, Jun 3, 2013 at 4:16 PM, Justin Deoliveira wrote: > > Am I missing something? Having a CircularString extends MultiLineString >> and Ring extends LinearRing is >> not going to be the end of the world, but I'd like to see if there are >> better options. >> >> I also thought about some sort o

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-03 Thread Justin Deoliveira
On Mon, Jun 3, 2013 at 7:32 AM, Andrea Aime wrote: > On Thu, May 30, 2013 at 10:06 AM, Andrea Aime < > andrea.a...@geo-solutions.it> wrote: > >> The GML2 model does not have any curved arc notion, so that's easy. >> The GML3 model has a number instead: >> * CircleByCenterPoint: this one we cannot

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-06-03 Thread Andrea Aime
On Thu, May 30, 2013 at 10:06 AM, Andrea Aime wrote: > The GML2 model does not have any curved arc notion, so that's easy. > The GML3 model has a number instead: > * CircleByCenterPoint: this one we cannot represent as is with the work > I'm going to do, but it could be turned into > an equivale

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-05-30 Thread Andrea Aime
On Wed, May 29, 2013 at 3:31 PM, Justin Deoliveira wrote: > Do you see a chance to consolidate? It would be nice to use a single set > of curve classes located in api or main and have the gml encoding work off > of them. > Right, I'm going to look into it, but can make no promises. The Circle cla

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-05-29 Thread Jody Garnett
Micheal Bedward had a utility class for working with Curves (used in the docs below). As such it can hold a method to generate curves in a consistent fashion. http://docs.geotools.org/latest/userguide/library/jts/geometry.html#arcs-circles-and-curves -- Jody Garnett On Wednesday, 29 May 2

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-05-29 Thread Justin Deoliveira
On Tue, May 28, 2013 at 8:00 AM, Andrea Aime wrote: > On Mon, May 27, 2013 at 9:17 PM, Justin Deoliveira > wrote: > >> Sounds like a good approach to me. So to clarify, are you planning on >> taking the Circle/Arc code from the gml3 module and putting that in the api >> module? >> > > Yes, and wr

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-05-28 Thread Jody Garnett
As from Monday's meeting, there is a small detail on how to handle linearization so that touching circular arcs line up. If you just take a set number of steps (say 32) between your start and end arc points you end up with situation shown. The "longer" arc will have longer line segments (and not l

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-05-28 Thread Martin Davis
Yes, fine with me. On Mon, May 27, 2013 at 2:15 AM, Andrea Aime wrote: > > > For the latter I've cc'ed Martin Davis. Martin, is it ok to make a copy of > the WKBReader in GeoTools, keeping both the original copyright header and > the GeoTools one? The license is the same. > > ---

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-05-28 Thread Andrea Aime
On Mon, May 27, 2013 at 9:17 PM, Justin Deoliveira wrote: > Sounds like a good approach to me. So to clarify, are you planning on > taking the Circle/Arc code from the gml3 module and putting that in the api > module? > Yes, and wrap it in a CircularString class that hides the circular nature to

Re: [Geotools-devel] Supporting circular arcs in GeoTools

2013-05-27 Thread Justin Deoliveira
Sounds like a good approach to me. So to clarify, are you planning on taking the Circle/Arc code from the gml3 module and putting that in the api module? On Mon, May 27, 2013 at 3:15 AM, Andrea Aime wrote: > Hi, > I am looking into end-to-end support for circular arcs in GeoTools. > > The requir

[Geotools-devel] Supporting circular arcs in GeoTools

2013-05-27 Thread Andrea Aime
Hi, I am looking into end-to-end support for circular arcs in GeoTools. The requirement would be to take a circular arc from the data source (SQL Server 2012 in this case, http://msdn.microsoft.com/en-us/library/ff929141.aspx), and maintain the data in its native form until it can be encoded in GM