I am trying to read and parse the ESRI ST_Geometry which is an oracle user defined type in java manually, and I follow this instructions, and it said that:

.... Points: Contains the byte stream of the point coordinates that define the geometry

Now even I read the points(Blob in databse) to byte[], I have no idea how to transfer them to the coordinates.

Is this possible?

We have other data in the database which is not produced by ESRI product, if we use ESRI java SDE to access the Spatial data, and get other data from database, I think this is not a good idea. So we use Arcgis SDE to push the spatial data to the database, and try to access the data through jdbc.

And why I do not use the st_astext function to get the data is that we are using Hibernate in the application, and I am creating a custom Dialect to register the St_Geometry column type and read/write the struct. That's why I have to parse the data manually.

And I am inspired by the Hibernate Spatial project, which make the SDGeometry column type mappable.

  • 1
    Why? Wouldn't it be easier to use Esri to access the objects and then get the GeometryCollection/PointCollection from these? If you've got SDE why not use it? – Michael Stimson Mar 6 '15 at 1:39
  • 2
    I would also ask "Why?" and would point out the ability to query via Well-Known Text and Well-Known Binary formats. – Vince Mar 6 '15 at 1:42
  • See my updates. – giser Mar 6 '15 at 1:54
  • I am thinking you've made a rod for your own back imposing this restriction on yourself. You're not the only one who has non-spatial data in Oracle... if you're concerned about the access and integrity of these other tables then consider database permissions - it's one thing that Oracle is very good at; if you set them right SDE will not even be able to 'see' the tables its not supposed to. – Michael Stimson Mar 6 '15 at 2:24
  • 2
    If you write one WKT or WKB integration, you can support any WKT or WKB implementation. From the flip side, the Esri spatially aware query tools also support non-spatial column types, so there would be no reason to use multiple SDKs. – Vince Mar 6 '15 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.