0

Interesting sites are stored as polygon features are stored in an Oracle Spatial read only dB. I have a local GML file containing a line (EPSG:31370 - corresponding to a trajectory over a couple of streets). I wish to intersect the features in my dB with a buffered version of this line using SQL Developer.

How can I do this without being able to store the line within the dB?

I guess my final query needs to look like this:

WITH LINES AS (
    SELECT shape as 
    FROM dual
)

SELECT 
    *
FROM 
    SITES,
    LINES
WHERE
    sdo_relate(SITES.shape, line.shape,'mask=anyinteract')='TRUE'

Can I read the local GML file in my query or do I need to create a geometry object ('line or curve' geometry object) as described here? Do I have to use this?

  SDO_GEOMETRY(
    DL02,  -- line or curve
    31370, -- EPSG
 SDO_POINT SDO_POINT_TYPE,
 SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY,
 SDO_ORDINATES SDO_ORDINATE_ARRAY);

How do I create this line object in my query from the GML File? I wonder if there is a way I can simply c/p my GML feature member into the query?

  <gml:featureMember>
    <ogr:manif_27012019 fid="manif_27012019.0">
      <ogr:geometryProperty><gml:MultiLineString srsName="EPSG:31370"><gml:lineStringMember><gml:LineString><gml:coordinates>149466.395420695,172211.198058498 149218.157054392,172273.66326832 149047.797391243,171753.66067747 149513.447137184,171537.060534324 149960.134230142,171333.440175036 150044.502825226,170842.642097869 150047.849175752,170746.510573663 149879.314794708,170270.720371583 150395.261203102,170097.318571592 150313.123508369,169844.212786343 150366.665116788,169832.652666343</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
      <ogr:id>1</ogr:id>
    </ogr:manif_27012019>
  </gml:featureMember>

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.