Questions tagged [geometry]
50 questions
11
votes
2 answers
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(102.1893310546875 3.880696482497261)', 4326)
It…
newbie
- 217
- 2
- 7
9
votes
4 answers
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, just because a zip's center point is not within a…
I wrestled a bear once.
- 115
- 1
- 11
8
votes
3 answers
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 access & update their coordinates. If I was using…
User1974
- 1,517
- 25
- 54
7
votes
2 answers
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.
After some searching I came across the SQL…
wilkokosten
- 171
- 1
4
votes
1 answer
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 PostGIS Spatial Aggregate function ST_Union
for…
Yassine LD
- 838
- 11
- 26
3
votes
3 answers
Is a GIST index on a geometry point useful to speed up a spatial query?
I have multiple tables with point geometries and a GiST index eating many gigabits of space.
From what I understand about GiST indexes on polygons or polylines, it will store the bounding box and compute a first calculation on the bounding box…
Boodoo
- 65
- 8
3
votes
1 answer
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 Language (GML) elements are stored in MS SQL Server's…
Jens Wagemaker
- 131
- 4
3
votes
1 answer
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 where a.location = '93.2321, 21.0321';
Getting this…
Thirumal
- 2,548
- 3
- 16
- 24
2
votes
0 answers
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, ' ', longitude, ')' ), 4326);
ALTER TABLE…
adam78
- 155
- 1
- 8
2
votes
1 answer
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 STGeomFromText:
Rayner
- 121
- 5
2
votes
1 answer
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 called OGC but they do not offer any converters so…
user7387653
- 25
- 4
2
votes
1 answer
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 and some other infos as username.
Deal is to…
Zoé R.
- 61
- 1
- 6
2
votes
1 answer
Why I can't calculate the distance between a fixed point and a geometry field of a MySql table using this distance function?
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 earth_circle_distance(point1 point, point2 point)…
AndreaNobili
- 123
- 3
2
votes
1 answer
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 type is two dimensional, and a geography type is 3…
Justin Dearing
- 2,717
- 6
- 36
- 52
1
vote
1 answer
What is the fastest way to compare polygon geometry data?
We have two tables with polygons stored in geometry type columns.
I want to fetch the polygons present in one table that are not present in another table.
As of now I am doing a left outer join and using STAsText(), however that is taking a very…
Balu
- 71
- 2
- 4