What about using an empty geometry? That is currently supported in JTS.

On Dec 13, 2007 9:32 AM, Andrea Aime <[EMAIL PROTECTED]> wrote:

> Justin Deoliveira ha scritto:
> ...
> > Indeed. My idea would be to subclass each of the geometry types. So
> > creating a class called NullPoint, NullLineString, etc... that
> > implemented the NullGeometry interface. Then no existing code should run
> > into any of the exception cases which arise when something is not one of
> > the well known geometry types. However I may have to subclass some
> > existing classes to be "NullGeometry" aware, and nooop when it sees one.
> > Example being GeometryCoordinateTransformer or whatever it is called.
> >
> > Its a hack... I know... but the best one i can come up with given the
> > constraints of the project i am working on, limited funding, hard
> > deadline, and a directive to take a "shortes path" approach.
>
> Wondering if making subclasses that implement NullGeometries and
> initializing all coordinates with NaN is enough to avoid having
> to add special handling code everywhere... hmm... that is probably
> going to work rendering wise (no rendering will occurr, exceptions
> are ignored), but will bust any attempt to store these
> geometries.
>
> Maybe it's the case to use a query hint for the datastore to tell it
> how do deal with these null geometries? (that is, if to create
> a NullGeometry or use a plain null). This way you could use these
> strange beasts only when strictly needed.
>
> Cheers
> Andrea
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to