I have a task to create sql queries to insert data in oracle column.
The datatype is SDO_GEOMETRY
I have only Latitude and Longitude values.
Any pointers will be helpful
The full doc has more examples but here's the snippet you need.
SDO_GEOMETRY(2001,
4326,
SDO_POINT_TYPE(37.783333, -122.416667, NULL),
NULL,
NULL)
Full Doc: https://docs.oracle.com/cd/E17781_01/appdev.112/e18750/xe_locator.htm#XELOC563
In addition to saving the Lat&Lng in the SDO_GEOMETRY column as Kris Rice said, you can use the many useful features of Oracle Spatial and Oracle Locator to achieve some useful results.
In order to use those features, the below steps must be taken:
The detail of the above steps is explained here .
After the above steps have been done, you can use useful operators provided by Oracle Locator. For example, you can find the locations that are within X meters distance from a given point. For more details, read this Oracle document.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.