oracle-spatial

How to read Oracle Spatial data with rgdal (missing drive?)

淺唱寂寞╮ 提交于 2021-01-28 11:31:20
问题 I would like to read spatial data into R from my Oracle Spatial database. When I execute ogrDrivers() I do not see anything for Oracle Spatial. And the following fails: > require(rgdal) > ogrInfo(dsn="OCI:myusr/mypwd@mydb:MYTABLE:") Error in ogrListLayers(dsn = dsn) : Cannot open data source It looks like Oracle Spatial driver is not normally built into OGR (Oracle makes it really difficult for everybody to work and interoperate with other eco-systems!). I am wondering whether there are other

Get midpoint of SDO.GEOMETRY polyline

China☆狼群 提交于 2020-01-24 12:05:28
问题 I have a table in Oracle 18c that has an SDO_GEOMETRY column with polylines. I want to query the X and Y coordinates of the polyline midpoints using SQL. Is there a way to do this with Oracle Spatial? 回答1: Oracle Spatial has a linear referencing package called SDO_LRS. It can be used to find the midpoint coordinates of a polyline. --In this case, 'sdo' is the name of the sdo_geometry column. sdo_lrs.convert_to_std_geom(sdo_lrs.locate_pt(sdo_lrs.convert_to_lrs_geom(sdo,3) ,sdo_geom.sdo_length

Oracle spatial search within distance

你。 提交于 2020-01-11 20:26:26
问题 I have the following table Cities: ID(int),City(char),latitude(float),longitude(float). Now based on a user`s longitude(ex:44.8) and latitude(ex:46.3) I want to search for all the cities near him within 100 miles/KM. I have found some examples but don`t know how to adapt them to my case select * from GEO.Cities a where SDO_WITHIN_DISTANCE([I don`t know], MDSYS.SDO_GEOMETRY(2001, 8307, MDSYS.SDO_POINT_TYPE(44.8,46.3, NULL) ,NULL, NULL), 'distance = 1000') = 'TRUE'; Any help would be

Hibernate 5 HQL translator for Oracle Spatial

♀尐吖头ヾ 提交于 2019-12-25 10:02:28
问题 I am upgrading an application from Hibernate 3.6.10.Final to 5.0.7.Final The main issue I have right now is that when before the Oracle dialect would generate a fast enough query like this : SELECT * FROM MY_TABLE WHERE SDO_RELATE(geom,SDO_GEOMETRY(?,4326),'mask=INSIDE+COVEREDBY') ='TRUE' Now it will generate something terribly slow: SELECT * FROM MY_TABLE WHERE MDSYS.OGC_WITHIN(MDSYS.ST_GEOMETRY.FROM_SDO_GEOM(geom),MDSYS.ST_GEOMETRY.FROM_SDO_GEOM(?))=1 This one will not finish on time and

SQL syntax error in creating spatial network

吃可爱长大的小学妹 提交于 2019-12-25 05:03:29
问题 I am trying to create a spatial network from a shapefile (representing street centrelines) imported into an Oracle DB with FME Desktop. The 'CENTRELINES' spatial object contains a GEOM column that I'd like to use as the basis for a network analysis to allocate ambulance facilities (points) among retirement homes (points) based on route distance as a cost attribute. Any advice on methodology for approaching this morbid problem in Oracle Spatial would be welcome, but the main issue is that I am

Oracle - Converting SDO_GEOMETRY to WKT?

柔情痞子 提交于 2019-12-23 10:26:46
问题 I am very new to oracle spatial. I have a spatial table with one SDO_GEOMETRY column. After inserting POINT data in this table, I want to retrieve data in WKT format. Here is what I did: Inserting data - INSERT INTO new_test (name, geom) VALUES ( 'Test', SDO_GEOMETRY( 2001, 4326, SDO_POINT_TYPE(12,14,NULL), NULL, NULL)); Fetching data - SELECT NAME, SDO_UTIL.TO_WKTGEOMETRY(GEOM) AS point FROM NEW_TEST; Output - NAME | POINT ------------- Test | (null) Why do I get null here? Shouldn't it

How to determine the radius and center of a circle when only three noncollinear points are known?

妖精的绣舞 提交于 2019-12-22 10:39:43
问题 I'm working on a C# program that deals with Oracle Spatial geometry. When circle data is stored in a geometry field only three non-collinear points are stored to represent the circle. The problem is that I need to use this data on a Google Maps web page and need the center point and radius of the circle (since my circle drawing function uses that information). Can anyone help with the math involved and translating said math to C#? I think this page may hold the answer, but I'm having a hard

saving a polygon in oracle database

会有一股神秘感。 提交于 2019-12-14 00:25:01
问题 I have captured four points(coordinate) of a plot using a gps device. Point 1:- lat- 27.54798833 long- 80.16397166 Point 2:- lat 27.547766, long- 80.16450166 point 3:- lat 27.548131, long- 80.164701 point 4:- --- now I want to save these coordinate in oracle database which save it as an polygon. Thanks 回答1: If you're intending to use Oracle Spatial for storage or processing of polygons, then you'll need to store the data as an SDO_GEOMETRY object. Here's a quick example: CREATE TABLE my

Oracle Spatial - select objects falling within area

…衆ロ難τιáo~ 提交于 2019-12-11 07:44:31
问题 this is probably simple to those who know (I hope!) I have an Oracle spatial database with a geometry column containing a list of node points, in northing/easting format (if it's relevent!) I need to select those objects which fall within a given radius of a given point. Northings and Eastings are 1 meter apart which makes it a bit easier. Ideally this should include objects which cross the area even if their node points fall outside it. Is this an easy-ish query? Maybe using SDO_WITHIN

Couldn't get at the OracleSpatial Connection object from the PreparedStatement

依然范特西╮ 提交于 2019-12-11 03:49:19
问题 i am using hibernate spatial 4.3.2 along with hibernate 4.3.11 and my db is oracle 12c. I use hikariCP for connection pool. when I use hikacriCP I get an error that seems that cause is hibernate spatial can not access to the wrapped connection of hikari connection instance, this is my exception: problem is hibernate throws error when saving an entity that contains geometry field. Couldn't get at the OracleSpatial Connection object from the PreparedStatement when I remove hikari, everything is