Oracle 18c: How can I get the X & Y coordinates from GEOM_SEGMENT_START_PT()’s resulting LRS point? Note: The coordinates are stored in the SDO_ORDINATE_ARRAY( ), not the SDO_POINT. Desired output: Normally, I’d use something like a.shape.sdo_point.x. But I don’t think that applies here since the coordinates aren’t stored in the SDO_POINT. Related: Oracle Spatial Community – Get X & Y
Tag: geometry
SQL switch latitude and longitude positions in the polygon string
I have a text that contains polygon information Example data: it there any way that could swap “lat” and “lng” in this string in SQL Server? Expect outcome: Any help appreciate! Answer What you have here is JSON. You can break out the info using OPENJSON, swap it round, and rebuild it using FOR JSON: db<>fiddle If you have a
Querying a list of geometry objects from Oracle based on list of x and y coordinates
We are using an Oracle database table with SDO_GEOMETRY objects. I would like to return the rows where the column with the geometry object contains a certain point (x, y coordinate). I know I can query the table using a single point geometry like this: But let’s say I have a list of coordinates and I would like to have
PostgreSQL Transform Geometries
I have a table full of Easting/Northing points that I want to transform into a column in SRID:27700. I’m using Postgres with postgis installed. I’m trying this: Of course this returns the locations in easting/northing, but when I try to first transform the points using ST_Transform, it returns SQL Error [42883]: ERROR: function st_transform(character varying, integer) does not exist I
Given a long/lat, convert meters into longitude/latitude degrees
I have a longitude and latitude stored as a geometry with SRID 4326. I want to make a line that is exactly 1000 meters long that is 90 degrees (to the right). I know that the conversion from a …
MSSQL Geometry, distance from point inside shape to closest edge
I have a shape file that I have imported in to MSSQL as a table with a geometry column. The geometry column is essentially the outline of the UK coastline. What I have been asked to do is to be able to supply latitude/longitude and calculate the closest distance to the coast I have established that the problem I am