2 Replies Latest reply: Feb 17, 2012 2:42 PM by mmillman RSS

    Manipulating ST_ANNOTATION_TEXT

      I've been experimenting with ST_ANNOTATION_TEXT and would like to build a small package to facilitate further work. I've used the example in the Spatial Developers Guide to create ST_ANNOTATION_TEXT rows and I've implemented a JAXB package to create the text attributes. I'm able to visualize text now with various fonts, sizes, weights, decorations, etc. But the ST_ANNOTATION_TEXT is an awkward structure with the useful attributes buried inside a VARRAY under four Types and I've not yet figured out how to read or update the individual ST_ANNOTATION_TEXT components.

      I'm hoping someone can provide me with an example UPDATE statement that would let me update the label, geometries, and text attributes of an ST_ANNOTATION_TEXT element. And, what I'll eventually need to get to is Java code to create, select, and update ST_ANNOTATION_TEXT attributes. I'm primarily working with JPA but I'll start first with JDBC and move on to supporting it in JPA later.

      Thanks in advance for any assistance you might be able to offer.


      P.S. if anyone wants a copy of the JAXB ogcAnnotation package just ask and I'll email it to you. msm

      Edited by: mmillman on Feb 1, 2012 9:33 AM
        • 1. Re: Manipulating ST_ANNOTATION_TEXT
          Hi Mark,
          MapViewer internal libraries have the support for annotation texts and could be used, but they are not public with supported documentation. If you have done any implementation using some of MapViewer internal libraries, then you may be able to use the annotation text part. You can write to me joao dot paiva at oracle dot com and we can talk more about this.

          • 2. Re: Manipulating ST_ANNOTATION_TEXT
            Yes, I found the classes in sdoviz (but only after I'd written my half baked versions). I was able to successfully create a JPA Converter and have that plus a JUnit test package that runs through both JDBC and JPA CRUD tasks. So if anyone wants these just send me an email and I'll happily send them back to you.

            But, having done that and explored the functionality of ST_ANNOTATION_TEXT I'm almost certain that we won't use it unless we run across a client with a legacy implementation of it. The structure is awkward and complex and I half-suspect that it is only there to satisfy OGC compliance requirements. No blame to Oracle though, it is clearly the OGC standard, but like much OGC standards I struggle to believe that the designers ever actually had to deliver a functioning system. Before I get flamed, I express that opinion having been programming and creating spatial database and GIS systems for 34 years now and I'm a very 'practical' programmer. ST_ANNOTATION_TEXT just doesn't seem to be the model I'd want to use to implement a powerful annotation subsystem with.

            Thanks for you help though and if anyone wants the Eclipselink JPA Converter for ST_ANNOTATION_TEXT I'm happy to email them the source code.


            Edited by: mmillman on Feb 17, 2012 12:42 PM