[geos-devel] Question about Geometry and GeometryFactoryrelationship...

Martin Davis mbdavis at VividSolutions.com
Wed May 11 13:02:18 EDT 2005


Geometrys need some metadata to allow methods to execute.  This
currently includes things like PrecisionModel and SRID (and may grow to
include more things in the future).  Rather than duplicate these for
every geometry, the GF is referenced by the geometry and shared with any
created geometrys.  This works well in the Java world.  

In the C++ world if this is a problem I guess each Geometry could own
its own copy of the GF.  This would require a code change to make
Geometrys copy the GF for created Geometrys, rather than keep a
reference to it.

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: geos-devel-bounces at geos.refractions.net 
> [mailto:geos-devel-bounces at geos.refractions.net] On Behalf Of 
> Steve Lime
> Sent: May 11, 2005 9:52 AM
> To: geos-devel at geos.refractions.net
> Subject: [geos-devel] Question about Geometry and 
> GeometryFactoryrelationship...
> 
> 
> Hi All: I'm running into trouble making a clean integration 
> of GEOS into MapServer. Problem is that GeometryFactory 
> objects must persist while any Geometry objects spawned from 
> that factory are in us. This makes it necessary to either use 
> a global factory which is problematic with theading, or 
> somehow couple the two so that they are created, persist and 
> are deleted together. I'm curious why Geometry's cannot 
> stand-alone? Perhaps I'm missing something obvious in my 
> implementation.
> 
> Steve
> 
> Stephen Lime
> Data & Applications Manager
> 
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
> _______________________________________________
> 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