[geos-devel] GeometryFactory argument in Geometry constructors

strk strk at keybit.net
Wed Jun 30 16:58:29 EDT 2004


I ask and answer myself :)
I've removed GeometryConstrauctor automatic copy from
Geometry constructors. This want change the way applications
will call them.

Now on with the ref/pointer switch for ownership...

--strk;

On Wed, Jun 30, 2004 at 09:49:14PM +0200, strk wrote:
> Another element which should be take part of the next API
> is GeoemtryFactory. GEOS-1.0 did not have geom constructors
> taking GeometryFactory (did have PrecisionModel and SRID which
> the constructors used to build a new Factory). Next GEOS will
> have GeometryFactory as an argument to the constructor (so to
> have PrecisionModel and SRID already defined there).
> 
> Would the factory element of each Geometry be better a pointer
> to external resource or a owned copy ? It is currently a copy
> so I was wondering. If we need both behaviour with this too
> it will make 4 constructor versions for each geometry :!!
> 
> Just a note: when building a geometry with no defined factory
> current behaviour is to create a new Factory (which would leak
> unless deleted at geometry destruction time). If we decide to
> go with pointer-to-external-object we could use an
> internalGeometryFactory in thee cases.
> 
> --strk;
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel



More information about the geos-devel mailing list