12 Ответы Последний ответ: 04.10.2006 7:05, автор: 536797

    SOS! Please help me about GeoRaster Mapviewer problem!!!

    536797
      Hi!
      I am very miserable. I want to see GeoRaster Data with MapViewer 10. I have finished all guides but No result. The following details:
      - I load image (DALAT.GIF) into Georaster successfully and estable extentspatial, metadata,etc.. as Mapviewer guide for Georaster theme at location 2.3.6.
      - After that, I copy jai_core.jar and jai_codec.jar into ../web/Web-Inf/lib.
      - Then repair MapviewerConfig.xml to respone to my Database.
      - Then at window of Mapviewer, I paste my Map request following:
      xml_request=<?xml version="1.0" standalone="yes" ?>
      <map_request
      title=""
      datasource="ThoaGlobName"
      width="288"
      height="192"
      format="GIF_URL" >
      <themes>
      <theme name="geor_theme" >
      <jdbc_georaster_query
      jdbc_srid="82216"
      datasource="ThoaGlobName"
      georaster_table="ThoaImage"
      georaster_column="Image"
      raster_id="1"
      raster_table="ThoaImageRDT"
      asis="false">
      </jdbc_georaster_query>
      </theme>
      </themes>
      </map_request>
      Then click Submit button.
      I see MapViewer give errors following:
      <?xml version="1.0" encoding="UTF-8" ?>
      <oms_error>Message:[oms] error parsing given xml map request. Fri Sep 29 22:56:18 PDT 2006 Severity: 0 Description: oracle.xml.parser.v2.XMLParseException: Start of root element expected. at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:205) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:305) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:267) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:253) at oracle.lbs.mapserver.oms.parse(oms.java:606) at oracle.lbs.mapserver.oms.getXMLDocument(oms.java:864) at oracle.lbs.mapserver.oms.doPost(oms.java:303) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Unknown Source)</oms_error>
      PLEASE HELP ME! I do not know where I wrong. It is time for me to post my final test. I am very worried! I am regard high your help.Thank you so much!
        • 1. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
          Lqian-Oracle
          The map request you paste into the request text area should NOT include the string 'xml_request='.
          • 2. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
            536797
            Thank you very much for you reply! I am very move to your help! I try to correct this problem. If I have any question, would you please help me? Because I have it little time to finish my final gradulation at Ptit university. I would like to thank you!
            Best regard!
            Thoa.
            • 3. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
              536797
              I correct following request you sent to me. And I see map response following:
              <?xml version="1.0" encoding="UTF-8" ?>
              - <map_response>
              - <map_image>
              <map_content url="http://kimthoa:8888/mapviewer/images/omsmap1_12.gif?refresh=-5005733050785005705" />
              - <box srsName="default">
              <coordinates>409568.0,3752952.0 419093.6,3759302.4</coordinates>
              </box>
              <xfm matrix="33.07499999999992 0.0 0.0 -33.07499999999992 409568.0 3760890.0" />
              <WMTException version="1.0.0" error_code="SUCCESS" />
              </map_image>
              </map_response>
              But I do not see an Image. How can I see it? and where I wrong. I have no information in log file in the driver../Web-Inf/log. Please help me! Thank you so much!
              Best regard!
              Thoa.
              • 4. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                536797
                After loading image into Georaster successfully, I prepare data for Georaster theme following:
                --------------------------
                -- Change the GeoRaster format.
                --------------------------
                declare
                gr1 sdo_georaster;
                begin
                --
                -- Using changeFormat with a GeoRaster object:
                --
                -- 1. Select the source GeoRaster object.
                select Image into gr1
                from ThoaImage where georid = 1;
                Themes
                -- 2. Make changes.
                sdo_geor.changeFormat(gr1, interleaving=BIP');
                -- 3. Update the GeoRaster object in the GeoRaster table.
                update ThoaImage set Image = gr1 where georid = 1;
                commit;
                end;
                /
                ---------------------------
                -- Generate pyramid levels.
                ---------------------------
                declare
                gr sdo_georaster;
                begin
                -- 1. Select the source GeoRaster object.
                select Image into gr
                from ThoaImage where georid = 1 for update;
                -- 2. Generate pyramids.
                sdo_geor.generatePyramid(gr, 'resampling=NN');
                -- 3. Update the original GeoRaster object.
                update ThoaImage set Image = gr where georid = 1;
                commit;
                end;
                /
                -----------------------------
                -- Georeference the GeoRaster object.
                -----------------------------
                DECLARE
                gr sdo_georaster;
                BEGIN
                SELECT Image INTO gr FROM ThoaImage WHERE georid = 1 FOR UPDATE;
                sdo_geor.georeference(gr, 82216, 1,
                sdo_number_array(30, 0, 410000.000000),
                sdo_number_array(0, -30,3759000.000000));
                UPDATE ThoaImage SET Image = gr WHERE georid = 1;
                COMMIT;
                END;
                /
                ------------------------
                -- Update the spatial extent.
                ------------------------
                DECLARE
                sptext sdo_geometry;
                BEGIN
                SELECT sdo_geor.generateSpatialExtent(a.Image) INTO sptext
                Themes
                FROM ThoaImage a WHERE a.georid=1 FOR UPDATE;
                UPDATE ThoaImage a SET a.Image.spatialextent = sptext WHERE
                a.georid=1;
                COMMIT;
                END;
                /
                commit;
                ------------------------------------------------------------------
                -- Create metadata information for the GeoRaster spatial extent column.
                ------------------------------------------------------------------
                INSERT INTO USER_SDO_GEOM_METADATA
                VALUES (
                'ThoaImage',
                'Image.spatialextent',
                SDO_DIM_ARRAY(
                SDO_DIM_ELEMENT('X', 410000.0, 470000.0, 0.000005),
                SDO_DIM_ELEMENT('Y', 3699000.0,3759000., 0.000005)
                ),
                82216 -- SRID
                );
                ------------------------
                -- Create a spatial index on the spatial extent.
                ------------------------
                CREATE INDEX Image_idx ON ThoaImage(Image.spatialextent)
                INDEXTYPE IS MDSYS.SPATIAL_INDEX;
                --------------------------------------------------------
                -- Create a predefined GeoRaster theme for MapViewer.
                --------------------------------------------------------
                INSERT INTO user_sdo_themes VALUES (
                'Image of DaLat City',
                'GIF image',
                'ThoaImage',
                'Image',
                '<?xml version="1.0" standalone="yes"?>
                <styling_rules theme_type="georaster" raster_table="ThoaImageRDT"
                raster_id="1" raster_bands="0,1,2">
                </styling_rules>' );
                commit;
                I do not know clearly about values on SDO_NUMBER_ARRAY(30, 0, 410000.000000),SDO_DIM_ELEMENT('X', 410000.0, 470000.0, 0.000005). I get it following MapViewer Guide 2.3.6.My image size(288,192).
                How can I get right value in SDO_NUMBER_ARRAY and SDO_DIM_ELEMENT? I send you a part of Metadata of my Image (not include color value because it is too long) and spatialxtent, spatial resolution.
                • 5. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                  536797
                  SQL> set long 20000;
                  SQL> set pages 100;
                  SQL> select a.Image from ThoaImage a;

                  IMAGE(RASTERTYPE, SPATIALEXTENT(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELE
                  --------------------------------------------------------------------------------
                  SDO_GEORASTER(20001, SDO_GEOMETRY(2003, 82216, NULL, SDO_ELEM_INFO_ARRAY(1, 1003
                  , 1), SDO_ORDINATE_ARRAY(410000, 3759000, 410000, 3756120, 410000, 3753240, 4143
                  20, 3753240, 418640, 3753240, 418640, 3756120, 418640, 3759000, 414320, 3759000,
                  410000, 3759000)), 'THOAIMAGERDT', 1, XMLTYPE(<georasterMetadata xmlns="http://
                  xmlns.oracle.com/spatial/georaster">
                  <objectInfo>
                  <rasterType>20001</rasterType>
                  <isBlank>false</isBlank>
                  <defaultRed>1</defaultRed>
                  <defaultGreen>1</defaultGreen>
                  <defaultBlue>1</defaultBlue>
                  </objectInfo>
                  <rasterInfo>
                  <cellRepresentation>UNDEFINED</cellRepresentation>
                  <cellDepth>8BIT_U</cellDepth>
                  <totalDimensions>2</totalDimensions>
                  <dimensionSize type="ROW">
                  <size>192</size>
                  </dimensionSize>
                  <dimensionSize type="COLUMN">
                  <size>288</size>
                  </dimensionSize>
                  <ULTCoordinate>
                  <row>0</row>
                  <column>0</column>
                  </ULTCoordinate>
                  <blocking>
                  <type>NONE</type>
                  <totalRowBlocks>1</totalRowBlocks>
                  <totalColumnBlocks>1</totalColumnBlocks>
                  <rowBlockSize>192</rowBlockSize>
                  <columnBlockSize>288</columnBlockSize>
                  </blocking>
                  <interleaving>BIP</interleaving>
                  <pyramid>
                  <type>DECREASE</type>
                  <resampling>NN</resampling>
                  <maxLevel>1</maxLevel>
                  </pyramid>
                  <compression>
                  <type>NONE</type>
                  </compression>
                  </rasterInfo>
                  <spatialReferenceInfo>
                  <isReferenced>true</isReferenced>
                  <isRectified>true</isRectified>
                  <SRID>82216</SRID>
                  <spatialResolution dimensionType="X">
                  <resolution>30</resolution>
                  </spatialResolution>
                  <spatialResolution dimensionType="Y">
                  <resolution>30</resolution>
                  </spatialResolution>
                  <modelCoordinateLocation>UPPERLEFT</modelCoordinateLocation>
                  <modelType>FunctionalFitting</modelType>
                  <polynomialModel rowOff="0" columnOff="0" xOff="0" yOff="0" zOff="0" rowScal
                  e="1" columnScale="1" xScale="1" yScale="1" zScale="1">
                  <pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
                  <polynomialCoefficients>125300 0 -0.03333333333333333</polynomialCoeffic
                  ients>
                  </pPolynomial>
                  <qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
                  <polynomialCoefficients>1</polynomialCoefficients>
                  </qPolynomial>
                  <rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
                  <polynomialCoefficients>-13666.66666666667 0.03333333333333333 0</polyno
                  mialCoefficients>
                  </rPolynomial>
                  <sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
                  <polynomialCoefficients>1</polynomialCoefficients>
                  </sPolynomial>
                  </polynomialModel>
                  </spatialReferenceInfo>
                  // Color Map...//
                  • 6. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                    536797
                    and here is spatial extent:

                    SQL> select c.Image.spatialextent from ThoaImage c;

                    IMAGE.SPATIALEXTENT(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_
                    --------------------------------------------------------------------------------
                    SDO_GEOMETRY(2003, 82216, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_AR
                    RAY(410000, 3759000, 410000, 3756120, 410000, 3753240, 414320, 3753240, 418640,
                    3753240, 418640, 3756120, 418640, 3759000, 414320, 3759000, 410000, 3759000))

                    SQL> select sdo_geor.getspatialresolutions(Image) spatialresolution from ThoaImage;

                    SPATIALRESOLUTION
                    --------------------------------------------------------------------------------
                    SDO_NUMBER_ARRAY(30, 30)
                    Please help me! I try my best but I do not view image by Mapviewer10.
                    Thank you so much!
                    • 7. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                      Jpaiva-Oracle
                      Hi Thoa,
                      you seem to have an image of 288x192 pixels. You can not use the coordinate parameters from the MapViewer guide, as they are for the sample image. Do you know more information about your image: spatial area (MBR), spatial resolution, SRID? What is the image format?

                      Let say you don't know any information about the image, but just the size. I would suggest you to use the MapBuilder to import the image, as it does everything that you tried to do, using a wizard. Some parameters that you can use on the wizard:

                      SRID = 999999 (unknown)
                      If you don't have any information about the spatial extent of the image, then assume some resolution value and MBR, just to be able to import and to display the image. For example:
                      a) assume spatial resolution equal 1 for X and Y.
                      b) Assume the upper left coordinate as:
                      Upper left X: 0
                      Upper left Y: 192 (the number of rows of your image).

                      In this case I'm just assuming the MBR of your image as (0,0, 288,192), which certainly is not right but will give you an idea of how to import the data. The when you issue a map request in MapViewer, you can use the center as 144, 96 and size 192.

                      If you get this to work, then later you can try to identify the correct spatial information for your image, and repeat the steps with the correct values.

                      Joao
                      • 8. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                        536797
                        Hi jpaiva!
                        I appriciate high your help.
                        Please let me give some ideas following:
                        - First, about spatial resolution of my Image. I can get it from SQL statement:
                        SQL> select sdo_geor.getspatialresolutions(Image) spatialresolution from ThoaImage;

                        SPATIALRESOLUTION
                        --------------------------------------------------------------------------------
                        SDO_NUMBER_ARRAY(30, 30).
                        - Second, I do not know SRID, so that I use SQL to show some SRID from MDSYS object and I choose random 82216. I think it wrong because I read again Georaster Guide, it says that "If you do not know SRID, you can choose SRID = 999999 (unknown) after you know SRID you can change it". Please let me ask how to know SRID (after you know SRID )of my Image to change value 999999?.
                        - Third, I read structure of RasterTableRDT (geor_raster object), there is BLOB object and MBR. Why all of example I read, do not creat RasterTableRDT include two object just rasterid, pyramidlevel, blockrowdimension, blockcoldimension...
                        How can I get MBR and BLOB (save cell data of my image)? You can read Metadata, prepare Georaster data that I posted to you in threads before.
                        - Fourth, following sample image at Mapviewer Guide, I do not know to fill paramater in sdo_geor.georeference. MapViewer do it:
                        sdo_geor.georeference(gr, 82216, 1,
                        sdo_number_array(30, 0, 410000.000000),
                        sdo_number_array(0, -30,3759000.000000));
                        with my Image, I do not know value to fill in sdo_number_array and SRID.
                        I do not also know to fill in USER_SDO_GEOM_METADATA. Mapviewer do it:
                        INSERT INTO USER_SDO_GEOM_METADATA
                        VALUES (
                        'GeoRasterTable',
                        'GeoRaster.spatialextent',
                        SDO_DIM_ARRAY(
                        SDO_DIM_ELEMENT('X', 410000.0, 470000.0, 0.000005),
                        SDO_DIM_ELEMENT('Y', 3699000.0,3759000., 0.000005)
                        ),
                        82216 -- SRID
                        );
                        How can I fill with my Image?
                        - Fifth, Please let me use Geor_import to import my image, maybe I farmily with it. It is difficult to me to understand another technique.
                        - Six, just in a month I must finish my final project. I very worried. After load and view Image by Mapviewer, I must coding with Georaster data by ASP.NET. I worried very much. Please help me! It just a example image that my teacher ask me farmily with Georaster. He says today he will send a main image use for my final project from GoogleEarth. It's Size may be large, (1174, 512). I must finish with example image to make the same to main image. Please help me! I am very grateful to you! I come from VietNam and surrounding me there is anyone know about Georaster. I am very Worried! Thank you so much!
                        Thoa.
                        • 9. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                          Jpaiva-Oracle
                          Hi Thoa,
                          as I mentioned before you should not use the values from MapViewer Users Guide as they refer to the sample image. You can use the script sample to import the image, if you feel more comfortable. But you will need to replace the values with the correct information from your image. When you get the project image (lets say a tiff image), ask your professor if there is information about the image area, resolution, and spatial reference. You may find some programs that reads a TIFF image and list this information. Then post this information, so we can give more help.

                          Joao
                          • 10. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                            536797
                            Good morning Joao!
                            Thank you so much for your soon reply! Tomorrow I will get an image from my teacher, at that time, would you please help me? But, now, please let me ask one problem: I read structure of RasterTableRDT (geor_raster object), there is BLOB object and MBR. Why all of example I read, I do not see RasterTableRDT include two this object. It just include rasterid, pyramidlevel, blockrowdimension, blockcoldimension...
                            How can I get MBR and BLOB (save cell data of my image)? Because after that I need image processing with Georaster data. Please help me! Thank you!
                            Have a good day!
                            Thoa.
                            • 11. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                              Jpaiva-Oracle
                              Hi Thoa,
                              the raster data table stores the GeoRaster blocks with pixel values for each pyramid level. Instead of query this raster data table to get the data, you should use the PLSQL package for GeoRaster. You will find procedures that allow you to retrieve the BLOB contents given a MBR or not. Take a look at the GeoRaster documentation.

                              Joao
                              • 12. Re: SOS! Please help me about GeoRaster Mapviewer problem!!!
                                536797
                                Hi Joao!
                                Thank you for soon reply!
                                Now, may be I have many problems need to exchange with you. I would like to contact direct with you such as chat to get more to do my project. Please let me give my address: wellwishes81184@yahoo.com.
                                Could you help me!
                                I am grateful to you very much!
                                Thoa.