3

I am using Oracle Spatial to match geo-specific images to the appropriate country they represent.

I have a table with a row for each country. Each row consists of a SDO_GEOMETRY column for 3 items: SHAPE (overall boundaries), CENTROID (centerpoint of the country) and MBR (Minimum Bounding Rectangle). The Centroid and MBR fields are auto-computed using SDO_GEOM.CENTROID and SDO_GOEM.SDO_MBR respectively.

Mostly there are no issues, however... For some countries that span the 180deg Longitude line, the MBR created is wrong. I believe this is caused by Oracle handling the (co)Ordinates as X,Y values.

For instance, using Russia as an example. The LowerLeft value of the MBR is returned as (41.19268056, -180) while the UpperRight value is returned as (81.858710028, 180). When mapping this bounding box, it covers a swatch that spans 360deg (and encompasses many countries along the way).

Another example is Kiribati. The LL returned is (-11.46111418, -174.543405728) and the UR is (4.7230899, 176.850922). Mapping this shows the bounding box as NOT crossing the 180Lat line, but rather spanning -174 to +176, when it should be progressing from 176...178...180...-178...-176...-174.

Any thoughts or ideas as to an solution?

===========================

EDIT

SQL used to populate the MBR row:

UPDATE schema.table SET mbr=sdo_geom.sdo_mbr(geometry);
  • Please edit the question to show the SQL you are using to populate the row. – Vince Oct 21 '16 at 11:21
  • What application are you using to map this? I seem to remember something about not using MBRs for this sort of purpose. They were only supposed to be used for querying data. I can't find the reference to it in the documentation though. Have you tried using a normal polygon (with 5 points)? – travis Oct 21 '16 at 14:53
  • Welcome to gis.stackexchange! Please edit the title of your question to include enough information for future visitors to be able to find this thread when looking for the same problem. – underdark Oct 21 '16 at 18:02
  • @travis: I am using ArcMap to double-check the results. – Sam Grant Oct 24 '16 at 13:06

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.