[geos-devel] GeometryFactory argument in Geometry constructors

strk strk at keybit.net
Wed Jun 30 15:49:14 EDT 2004


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;




More information about the geos-devel mailing list