Hi Alexandre,
On 26 Sep 2008, at 18:44, Alexandre Pretyman wrote:
> I've noticed that the Point Geometry instances that are loaded from
> the database have their CoordinateSequence implemented as
> MCoordinateSequence with MCoordinates inside. Is it possible to
> tell HibernateSpatial to use the JTS counterparts and not the ones
> in the org.hibernatespatial.mgeom package? I guess the other
> Geometry classes are affected as well.
Currently this is not possible, but I'll add it as a new RFE in JIRA.
I see that this could be useful.
>
> My problem is that I need to serialize the Geometry classes to a
> client which runs on a web browser and my CustomSerializer for the
> Geometry classes only know the JTS implementations (I am using the
> Google Web Toolkit to write the client).
>
> If it is not possible to tell HibernateSpatial to use only the JTS
> classes when loading a Geometry from the database, I guess I can
> convert MCoordinateSequence for a CoordinateArraySequence if I am
> not using the m attribute with no problems, correct? Or are there
> any caveats? My other options will be to write a custom serializer
> for the MCoordinateSequence, but that would mean I would have to
> replicate MCoordinateSequence on the client side with a custom
> implementation as well, so I would much rather transform it.
>
I think you can simply convert the MCoordinateSequence. I don't
foresee any problems. If you run into problems, just let us know.
Regards,
Karel
_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users