[postgis-users] Hibernate Spatial Postgis 3D
Max
postgis at lists.meisel.cn
Thu May 8 22:38:02 PDT 2008
Hello,
thank you Karel, thank you Drew, i figured out my problem, int the
hmb.xml-File i used the following entry:
<property name="theGeom" type="org.hibernatespatial.GeometryUserType">
<column name="the_geom" />
</property>
actually it should be:
<property name="theGeom" type="org.hibernatespatial.postgis.PGGeometryUserType">
<column name="the_geom" />
</property>
After changing the entry i can access the z-Coordinate in Drews way.
So thank you to help me to find the mistake.
Max
> Hi,
>
> The Hibernate Spatial version in subversion works just fine, and
> Drew's suggestion was right on the money. Calling toString() or toText
> () on a Point will only reveal its X and Y coordinate values. To
> access the Z coordinate you need to follow Drew's suggestion.
>
> Karel
>
> On 08 May 2008, at 11:09, Karel Maesen wrote:
> > Hi Max, Drew
> >
> > The 3D stuff hasn't been properly tested yet. Max, I'll test your
> > code later today, and see what is going on here.
> >
> > Regards,
> >
> > Karel Maesen
> > Geovise BVBA
> >
> > On 08 May 2008, at 09:25, Max wrote:
> >> Hallo Drew,
> >>
> >> i know, but did you tried p.getCoordinate().z, that should return the
> >> expected value. This Value actually should be stored in the database
> >> using the new code on the svn, but maybe i'm wrong...
> >>
> >> Max
> >>
> >>
> >>> Hiya Max,
> >>>
> >>> But the WKTReader which provides you with the Point object to
> >>> persist - does not support 3D.
> >>>
> >>> See the following:
> >>>
> >>> String wktPoint = "POINT(12 14 15)";
> >>> WKTReader reader = new WKTReader();
> >>> try {
> >>> Point point = (Point) reader.read(wktPoint);
> >>> System.out.println(point.toString());
> >>>
> >>> } catch (ParseException e) {
> >>> e.printStackTrace();
> >>> }
> >>>
> >>> The result will be: POINT (12 14)
> >>>
> >>> HTH
> >>>
> >>> Drew
> >>>
> >>>
> >>>
> >>> On Thu, May 8, 2008 at 3:32 PM, Max <postgis at lists.meisel.cn> wrote:
> >>> Hallo Drew,
> >>>>
> >>>> this is right, 3D support seems to be only in the SVN-Version, its
> >>>> Version 94 in the repository, should be from march this year.
> >>>>
> >>>> Max
> >>>>
> >>>>> Hiya Max,
> >>>>>
> >>>>> Which version of the library are you using? It looks like 3D
> >>>>> support is only in svn.
> >>>>>
> >>>>> Drew
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> postgis-users mailing list
> >>>> postgis-users at postgis.refractions.net
> >>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >>>>
> >>>>
> >>>
> >>>
> >>
> >> _______________________________________________
> >> postgis-users mailing list
> >> postgis-users at postgis.refractions.net
> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list