Skip to main content

Questions tagged [geography-data-type]

geography data type, stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates.

1 vote
0 answers
34 views

Calculate surface area of a geography instance using StArea() in T-SQL

In my (Azure SQL Server) database I have stored polygons in the format "MULTIPOLYGON (((longitude1 latitude1, longitude2 latitude2, etc)))". I want to calculate the total surface area of ...
user11453289's user avatar
2 votes
1 answer
92 views

Create a new point geometry from origin point geometry, distance and bearing in PostgreSQL

I am trying to create a new point geometry field from this command: UPDATE cat.datos_parcelas SET arb_geom = ST_SetSRID(ST_Project(geom, arbdist, radians(arbrumbo)), 32631)::geometry; -- geom: ...
Isa's user avatar
  • 193
0 votes
1 answer
310 views

Geography type vs Geometry type for PostGIS intersections and other calculations

According to ChatGPT (which obviously could be very wrong) geometry type will always calculate based on Cartesian space even when the CRS is 4326 coordinates, whereas geography type will calculate ...
tbob's user avatar
  • 586
1 vote
0 answers
61 views

ST_intersects returns different result for Geometry params vs Geography params

ST_Intersects returns true for geography parameters but it returns false for geometry params: Following is the query for geometry params and it returns true which is incorrect. select ST_Intersects (...
Techbrake's user avatar
2 votes
0 answers
172 views

Geometry comparisons in SQL

Newbie to GIS here. Equality can be defined on a geographic value by seeing if they have a collection of the same points. For example, something like: -- The equality -- `LINESTRING(1 1, 2 2) = ...
David542's user avatar
  • 131
3 votes
1 answer
70 views

PostGIS ST_Relate reports polygons intersect but Google Maps says otherwise

I'm creating a Geography database that does not allow polygons to overlap/intersect (having positive common area that is). The user interaction flow is: User creates and exports a KML document from ...
nvat's user avatar
  • 31
2 votes
0 answers
183 views

Converting Geometry to a Geography yields an invalid shape SQL SERVER

I have two Geometry shapes of types Polygon or MultiPolygon [with Lat & Lng points] that I want to get their intersected shape. I do this as follows: land_shape.STIntersection(grid_shape) as shape ...
Hoda's user avatar
  • 151
1 vote
1 answer
56 views

ST_Covers(envelope, point) yields different results for same point

Clearly missing a basic concept. Using ST_Covers, I'm getting "true" for a geography point that clearly exists outside of the polygon. Looking at a number of points, it appears latitudes are ...
pbuck's user avatar
  • 121
0 votes
1 answer
187 views

Google Earth Engine update band values of aggregated image to just the values depicted in brackets in the band when data type is double

I am trying to aggregate the hansen forest loss data from a 30 x 30 m resoltuion to 1 km x 1 km resolution, where the value of the band is the proportion of the cell coverage. I feel like I am close ...
JT3ksc's user avatar
  • 3
2 votes
1 answer
178 views

geometry vs geography for distance measurement and large dataset

I'm working on a project where I have clusters of GPS coordinates to store, let's say ~20k points per cluster. The clusters overlay with big cities, like London or New York. I have many clusters ...
JPFrancoia's user avatar
2 votes
1 answer
449 views

converting geometry of SRID 0 to geography

My geometry columns have SRID of 0. Can I simply convert them to geography as such: routes.geom::geography <-> pc.geom::geography as distance in order to get "distance" in metres? P.S -...
analyst92's user avatar
  • 857
1 vote
0 answers
73 views

Unexpected ST_DWithin result when using geography [closed]

This query: SELECT ST_DWithin( ST_Buffer('SRID=4326;LINESTRING(7.1670005 45.9968257,7.1670216 45.9969537,7.1670216 45.9971326, 7.1670484 45.9972789, 7.1671905 45.9974074, 7.1672844 45.9974801, 7....
satoshi's user avatar
  • 111
3 votes
0 answers
321 views

Efficient way to "gridify" SQLGeography shape

Read the "Background" below for full details of why I want to achieve this. Given a shape, I would like to process it in such a way that it conforms to a 0.00001 x 0.00001 degree grid. (This ...
Tim.E's user avatar
  • 31
1 vote
1 answer
2k views

SQL Server STIntersects, STDistance and STCointains with Lat Lon points and Geometry Polygons [closed]

I need to create 3 functions in SQL Server (2017) that has to do the following: IsPointInsideTown(Point, TownCode, [SRID]) -> true/false: indicates if the point is inside the town's polygon. ...
Cheshire Cat's user avatar
6 votes
1 answer
325 views

ogr2ogr cannot import into table with two geography columns

I am using ogr2ogr to import geojson files into a PostGIS table. The table has two geography columns ("footprint" and "centroid"). The geojson files contain polygon features, and I ...
winwaed's user avatar
  • 1,314

15 30 50 per page
1
2 3 4 5
8