Showing posts with label geocoding. Show all posts
Showing posts with label geocoding. Show all posts

Thursday, February 11, 2010

How to get UTM/MGRS from Latitude/Longitude using Oracle

Oracle Spatial queries can be used to derive the UTM/MGRS from a given Latitude and Longitude.
The following sql provides an example on how to get the UTM/MGRS
Select SDO_CS.to_USNG( SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(41.98,33.23,NULL),NULL,NULL), 1) UTM_MGRS from dual;
 For more information on oracle spatial features, refer to http://www.oracle.com/technology/products/spatial/pdf/10gr2_collateral/locator_twp_10gr2.pdf

Oracle Locator vs Spatial

Oracle Locator Oracle Spatial

Free  included in oracle 10G onwards
What Can Oracle Locator Do for You?
Query nearest neighbor and other spatial relationships between geometries
Perform location queries on relational information not stored in Oracle Spatial geometry
Support long transactions
Store and index vector geometries in the database
Enhance application performance
http://www.oracle.com/technology/products/spatial/pdf/10gr2_collateral/locator_twp_10gr2.pd
    Additional option on top of oracle database
      What Can Oracle Spatial Do for You?
      Everything that Oracle Locator does, and:
      Perform length and area calculations on geometries
      Generate new geometries such as buffers and unions
      Perform coordinate systems transformations, for individual geometries or entire layers
      Store linear measure information
      http://www.oracle.com/technology/products/spatial/pdf/10gr2_collateral/spatial_twp_10gr2.pdf