# Questions tagged [geometry]

The tag has no usage guidance.

44 questions
Filter by
Sorted by
Tagged with
13 views

### Error Code: 3548. There's no spatial reference system with SRID 1498173264 - MySQL

I am trying to run a mysql query below: select * from geo where st_distance_sphere(Point(-118.2842557, 34.0676834), `geometry`) <= 1609 where geometry is of type Polygon. and get an error: Error ...
• 129
58 views

### storing altitude/height with MySQL geometry

We are using MySQL geometry data type to store polygons, polylines, multi-polygons and multi-polylines. We have come across the need to store depth/height data along with some of these features. My ...
• 109
22 views

### How to request an enhancement to SDO_GEOMETRY / Oracle Spatial

I want to suggest a few ideas to Oracle about enhancements to SDO_GEOMETRY / Oracle Spatial. Example: Requesting a function to select vertices, including the multi-part numbers of SDO_GEOMETRY ...
• 1,387
17 views

### Query trajectories that intersect two regions in pymongo

Consider a MongoDB where each document corresponds to a spatial trajectory. That is, there is a field that contains an array for each document. Each array is a sequence of latitude/longitude pairs ...
45 views

### Select SDO_GEOMETRY line vertices as rows -- using recursive WITH clause

I have an Oracle 18c table that has an SDO_GEOMETRY column (lines): create table a_sdo_geometry_tbl (line_id integer, shape mdsys.sdo_geometry); insert into a_sdo_geometry_tbl (line_id, shape) ...
• 1,387
201 views

### Extract SDO_GEOMETRY line vertices into a nested table column (in a query resultset)

Oracle 18c: In a related post, I demonstrated how to use the GetVertices() function and the Table() function to extract the vertices of an SDO_GEOMETRY line: Select SDO_GEOMETRY line vertices as rows ...
• 1,387
69 views

### Select SDO_GEOMETRY line vertices as rows

I have an Oracle 18c table that has an SDO_GEOMETRY column (lines): create table a_sdo_geometry_tbl (line_id integer, shape mdsys.sdo_geometry); insert into a_sdo_geometry_tbl (line_id, shape) ...
• 1,387
1 vote
146 views

### What is the format of raw geometry column in PostGIS?

It doesn't seem to be a WKB, since it's basically a string, so what is it?
• 139
55 views

### Postgis reporting a point is 1216m away from itself using ST_Distance [closed]

I have a table containing a geometry column in 4236 projection. I take the ST_X and ST_Y values from one row, and create a point from them. I then transform the point and the original geometry column ...
• 59
155 views

### MariaDB ERROR 1048 GeomFromText returning as null

I am trying to restore a databese from an old server onto a new server and my geomertry columns are not importing example UPDATE `property_floor` SET `floorBounds` = ST_GeomFromText('MULTIPOINT((115....
• 109
1 vote
82 views

### GeoJSON MultiLineString import to MySQL with SRID/CRS 27700, 'out of range'

Version 8.0.20 I'm importing a single link of the OSM road network with the intention of creating a buffer in MySQL. This is it: select st_srid(st_geomfromgeojson('{ "type": "Feature&...
• 13
1 vote
750 views

### Geo Route - Best way/db to store route path

We are developing an app in that UI need to show a path where a truck driver drives the truck. Driver mobile will continuously send (example every 10 seconds) their live location. Which database is ...
• 125
488 views

### How to get the type of geometry column in postgres?

I need to determine the type of geometry column and doing it with the following query: SELECT type FROM geometry_columns WHERE f_table_schema = 'public' AND f_table_name = 'table_name' ...
• 139
135 views

### Can't get PostGIS to show points on map - no button to activate map?

PostgreSQL 12 and PostGIS 3.0.1 on Windows 10, using PGAdmin4. I'm totally new to PGAdmin4 having recently come from PostgreSQL 9 / PGAdmin III - frankly, I don't like it but I'm trying. For the ...
582 views

### How to add Spatial Reference ID 28992 to MSSQL server?

I want to use Spatial Reference ID 28992, as found on EPSG, in MS SQL Server. How can I add this to MS SQL Server? My end goal is to get this dataset into MS SQL Server, with the Geography Markup ...
338 views

### MySQL 8 - Optimize query using ST_Contains or ST_Within

I have a table called locations with ~70000 records which includes a geometry column of points and a spatial index as follows: UPDATE locations SET geom = ST_GeomFromText(CONCAT( 'POINT(', latitude, '...
• 133
1 vote
92 views

### MySQL 8.0.18 - ST_Area returns invalid value

I have a problem with ST_Area function in MySQL 8.0.16. The result of the procedure call returns a different result than any library used to calculate the area of a polygon. Example: I have a ...
• 111
2k views

### Are there limitations on using pg_dump on a materialized view such that the data won't be included in the results?

I have a database, call it maps, which contains 2 schemas, a & b. In each schema I have a number of tables: a.t1, a.t2, b.t1, b.t2 (plus others). The column sets on each of these tables is ...
• 59
106 views

### Using PHP form to insert geometry from WKT and SRID into SQL Server 2017

I have a PHP 7.3 form that asks the user for a Name, a WKT and an SRID. I would like to upload the WKT and SRID to SQL Server 2017 so that it creates a geometric object in Upload_WKT_Test using ...
• 121
1 vote
716 views

### How to formulate equality predicate on POINT column in PostgreSQL?

How to select from a table with an equality predicate on point column? To be clear: it's a native Postgres point data type, not geometry(point) from PostGIS. select a.* from indsolv.address As a ...
• 1,868
1 vote
634 views

### How to create Polygon from Point datatype in MySQL?

I have a table like this: CREATE TABLE `aois` ( `aois_id` int(11) NOT NULL DEFAULT '0', `WS_A` point DEFAULT NULL, `WS_B` point DEFAULT NULL, `WS_C` point DEFAULT NULL, `WS_D` point DEFAULT ...
3k views

### Mysql 8 ST_GeomFromText giving error Latitude out of range in function st_geomfromtext. It must be within [-90.000000, 90.000000]

I am trying the following insert query on mysql 8. Insert Into fence Set fenceName='aa', radius=2, fenceGeometry=ST_GeomFromText('POINT(...
• 187
41 views

### How to run multiple ST_DWITHINs/ ST_INTERSECTS within a single WHERE clause

PostgreSQL 11, on Windows 10. I'm working with a post-gis enabled database. I want to UPDATE a large polygon table (100,000+ rows) WHERE the geometry of that host table intersects the geometry of ...
• 141
1 vote
528 views

### How to group-by to get MultiPoint/GeometryCollection in MySQL?

I have a table x like this: Columns: SubjectID int(11) Timestamp bigint(20) fix_geom point When i try to group my fix_geom column to a MultiPoint (or GeometryCollection) by SubjectID, like: ...
1 vote
513 views

### Testing Geometry Polygon Data is Valid Using a Stored Procedure

We are using a SQL Server Spatial database with the following table setup: SRID of 27700 geometry_column of ogr_geometry geometry_type of POLYGON I am using a SQL Server stored procedure to perform ...
• 111
91 views

### SQL syntax issue with geometry

I must be missing something pretty basic, but i have 2 tables. Both are basic, just a primary key (as a uniqueidentifier) and a geometry column in each. I'm trying to find if a point in one of the ...
• 257
423 views

### How to setup solution for multi-dimensional distance search with SQL Server spatial data types

I have an existing database solution that is not performing very well. I am searching on multi-dimensional data with a traditional table structure using floats, etc. The database contains ~ 1-2M rows. ...
• 171
37 views

### Basic Geometry Representation

I have an assignment in my introduction to database course. I chose to try and do a database model to represent basic geometric figures and mathematical objects (functions, polynomes, etc). For ...
1 vote
771 views

### How do I dump spatial types, like point, with their SRIDs in MySQL?

I am testing the point data type on Mysq 5.7 below is my java insert query. String insertQuery1 ="INSERT INTO gtest3 SET " + "gDateTime='2017-07-16 01:00:00'"+ ",vehicleID=1"+ ",...
• 217
1 vote
422 views

### COM error on UnionAggregate

Has anyone ever come across a COMException while working with geography data in SQL Server? I didn't notice the error until I ran .Reduce() on the original zip code data. It may have happened before ...
928 views

### Converting spatial data from Oracle to MySQL

This is a followup to this question: Problem getting zips in raius via MySQL I have some spatial stuff in an Oracle table. MDSYS.SDO_GEOMETRY(2003,4326,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),...
859 views

### Problem getting zips in radius via MySQL

I have a table of zip codes which includes the center lat, lng for each zip code. I use it to get a list of zip codes within a given mile radius from any arbitrary point. It just occurred to me that, ...
935 views

### MySQL equivalent of a spatial ST_Union aggregate function?

I'm working on a DB-spacial project in Mysql and I was trying to perform a union operation for a group of shapes. Im looking for something similar to the SQL Server function UnionAggregate, or the ...
301 views

### Is there a way other than WKT to insert geometry to SQL Server?

I am using design data from *.dwg and *.dgn to insert geometries to SQL Server field which is set to geometry. All examples I see are using something called WKT which is a specification by a company ...
843 views

### Store Mesh in database

I hope this is the correct forum but will ask anyway: I have lots of Mesh data I want to store. Mesh is actually triangles. I hope it's not too of beginner question but wouldn't Geometry type of SQL ...
1 vote
731 views

### SDO_GEOM.SDO_INTERSECTION between a line and a polygon returns what?

I'm confused as to what exactly the SDO_GEOM.SDO_INTERSECTION returns in Oracle. Documentation is here, but only gives examples of two intersecting polygons. What if I have many lines, some of them ...
• 111
131 views

### Seaching points within a radius - performance issues

i'm in trouble and completely lost with a geometry search, using 2 tables, linked by uid, each one contains about 5 millions rows. One table with address and point coordinates, Second with user status ...
• 61
781 views

### Cross join on a numbers table to get line vertices, is there a better way?

The Question: I have a spatial table (road lines), stored using ESRI's SDE.ST_GEOMETRY user-defined datatype in an Oracle 12c geodatabase. I want to list the line vertices so that I can ultimately ...
• 1,387
451 views

### Why I can't calculate the distance between a fixed point and a geometry field of a MySql table using this distance function? [closed]

I am not so into database and GIS and I have the following problem. I have defined this function that return the distance between 2 points in the space represented by 2 point fields: CREATE FUNCTION ...
• 123
2k views

### ORDERBY timestamp performance issue

I have some queries dealing with coordinates stored in POINT. Everything is ok without order (about 0.6 ms to query a 5 millions posts and 1 million users database, for testing) but go to 13s when add ...
• 61
257 views

### Update all geometry points by adding/subtracting from XY

I want to update the POINT geometry column for all rows in a table. For example, I want to change POINT(1 1) to POINT(1.1 .9) UPDATE myTable SET geoPoint = asText(geoPointX+1 geoPoint Y-1) The ...
• 207
1 vote
656 views

### How do I find the cumulative distance between geometry points in SQL Server 2014? [closed]

I have a database designed to be a proof of concept for delivery of products from a central depot to customers distributed at random locations within ten miles of the depot. The depot location is ...
• 19
929 views

### What is the point of a SRID in a geometry type?

From my understanding, SRID is a projection code; how the 2d coordinate system is fit over a spheroid. The difference between Geometry and Geography types, from my understanding, is that a geometry ...
• 2,627
1 vote