Questions tagged [geometry-data-type]

The geometry data type supports planar, or Euclidean (flat-earth), data.

Filter by
Sorted by
Tagged with
2 votes
1 answer
77 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
  • 175
1 vote
0 answers
60 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
124 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
0 votes
1 answer
402 views

Geopackage geometry type confusion

I have a problem with multipolygon layer stored in geopackage. In QGIS 3.22, $area function simply dint't work for some features in field calculator and leaved null values. So I decided to convert ...
Adam's user avatar
  • 155
2 votes
1 answer
136 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
272 views

Using St_expand and St_Squaregrid work together in PostGIS

Using this query (which works), I am able to create a square grid. select ST_asGeoJSON(geom) from ( select ST_SquareGrid( 0.0001, ST_Transform( ...
bits's user avatar
  • 123
1 vote
1 answer
725 views

Forcing geometry columns to be small on pgAdmin 4

On pgAdmin 4, geometry columns always show as huge lines: So when I want to check the geometries inside Postgres I have to go all the way until the end of the line with a very small scroll bar: That ...
raylight's user avatar
  • 1,221
4 votes
2 answers
4k views

Check if geometry field in GeoPandas geodataframe have any row with specific type

This question is related to: Filtering by geometry type in GeoPandas I need to check if my geodataframe contains 'MultiPolygon' type. Below is my attempt, but it doesn't work. According to ...
Karol Zlot's user avatar
0 votes
1 answer
260 views

PostGIS tables don't retain SRID [duplicate]

I have multiple tables in a PSQL/PostGIS database which are comprised of GPS locations of animals. The tables are uploaded into the database with latitude, longitude, and timestamp columns, and then I ...
whitney vogel's user avatar
9 votes
1 answer
3k views

MultiSurface Geometry type in QGIS: difference to MultiPolyon

Adding a new temporary scratch layer in QGIS, selecting the Geometry type, there are different options, between else MultiSurface. In the documentation, I could not find any information about this ...
Babel's user avatar
  • 70.6k
0 votes
2 answers
181 views

Wrong Boolean result when checking the type of geometry in Google Earth Engine

I would like to set a condition based on the type of selected geometry. However, applying the following code seems to give wrong results. var geometryCollection = /* color: #008000 */ee.Geometry({ ...
farhat's user avatar
  • 151
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
2 answers
624 views

Merging layers of certain geometry type only in QGIS

I have nearly a thousand layers of geospatial data consisting only of Point layers and Line Layers and I just want to make it so that I only have one layer for each type. Is there a way to filter to ...
user2552108's user avatar
3 votes
3 answers
1k views

Missing geometry type and SRID in PostGIS

I created a view with select a, st_union(geom) from table group by a srid: 25832, geometry type: Multipolygon The view has no SRID and the geometry type is "GEOMETRY". Now i want to ...
derby's user avatar
  • 83
1 vote
0 answers
33 views

Which type and range has the component M in a LineStringXYZM for ESRI-Shapefile and the PostGIS context

I want to compress a bunch of sequentially recorded positions with timestamps into a linestring with XYZ an M dimension (LineStringXYZM). Each set of points is represented by a constant part (ship ...
huckfinn's user avatar
  • 3,573
1 vote
0 answers
365 views

Aggregating data and displaying counts with GeoPandas

I have two datasets that I want to use. The first is a shapefile of King County that has polygons broken up by school districts. It has boundaries saved as polygon features on a geo-dataframe. The ...
Paul's user avatar
  • 19
0 votes
2 answers
321 views

PostgreSQL database designer that supports PostGIS geometry data types

Does anyone know if there are PostgreSQL database modeling software or apps that support PostGIS geometry data types? I know pgModeler is supposed to but I have been unable to get this installed.
Engman's user avatar
  • 69
3 votes
0 answers
111 views

Data type of date column is showing as string in QGIS but back in CSV file it is date type [closed]

I have created a .csvt file as name as same CSV file and placed in same directory. After that data type of date column are showing as a date type but when I am checking it in attribute table values ...
MapQuest's user avatar
  • 405
2 votes
1 answer
1k views

Can't convert a WKT with a Z value into a SQL Geometry value

I'm using nettopologysuite in c# to build a nettopology geometry object, and then save it as a geometry object in SQL. Generally this works fine, except i recent came up with (from a shapefile) the ...
Phil's user avatar
  • 336
4 votes
1 answer
133 views

Storing Central European data, which SRS/which data type?

I am creating a PostGIS 2.X data base to store some 500 or so sites as points in it, which are distributed in the northeastern part of Germany, northern Poland and parts of the southern Baltic coast. ...
C.-F. Vintar's user avatar
  • 1,608
5 votes
1 answer
339 views

ST_SnapToGrid takes a long time on

My ultimate goal is to fetch all points from a 4 million record table that fit within a given rectangle and group the results in clusters. All of the queries I have tried up until now take too long. ...
GNG's user avatar
  • 421
1 vote
0 answers
495 views

SQL server 2012 convert Multipolygon geometry to geography - GDA94 / MGA zone 55 coordinate reference system

Is there a way to convert geometry column value which has GDA94 / MGA zone 55 coordinate reference system into Geography value in SQL server 2012. The layer is a multipolygon layer We were having the ...
DJs's user avatar
  • 11
4 votes
1 answer
434 views

What is the vector data type of enclosed polyline?

For a long time, I was wondering which GIS spatial vector data types does the enclosed polyline feature possess. Somebody told me, that when polyline feature's last vertex meets the first one, e.g. ...
Taras's user avatar
  • 32.8k
1 vote
0 answers
152 views

How to get geographic data of any particular region of map in Geometry datatype format in SQL Server? [closed]

I am completely new to Geometry datatype format of a Microsoft SQL Server database. DataType is Geometry. If not wrong, geographic data contains latitude and longitude of each point of that map, ...
SSD's user avatar
  • 111
2 votes
1 answer
2k views

How to convert a spatial Oracle LOB object type to a Geodataframe listlike geometry object column

I have in my dataframe one column with cx_Oracle.LOB object [2D polygon type], made with a SDO_UTIL.TO_WKTGEOMETRY SQL function and I want to create a geodataframe, and set my geometry column the ...
Paulo Adão's user avatar
9 votes
0 answers
837 views

Change from LineString to MultiLineString when saving layer edits in QGIS

In QGIS, when a user creates a new single part line in an open editing session for a “Multi-Line” SpatiaLite dataset, the QGIS data type is initially a “LineString”. But, when the user commits the ...
Philip Whitten's user avatar
0 votes
0 answers
867 views

SQL Server - ESPG:4326 data stored in Geometry column

It seems that the Microsoft SQL Server Geography data type is better suited for lat/lon because Geography "stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates." ...
user210757's user avatar
1 vote
1 answer
2k views

Creating or adding geometry colunm fails even with postgis enabled

I'm trying to add a geometry colunm to a table in a database with postgis extention enabled (other tables in this schema even have geometry colunms), but it fails: ALTER TABLE my_schema.my_table ADD ...
Basile's user avatar
  • 3,543
7 votes
1 answer
4k views

Batch removing null geometries

Is there a way batch remove or delete null geometries from hundreds of small polygon vector files in QGIS, while saving the new clean file to their original directories? I can't check for and fix ...
Joules's user avatar
  • 445
2 votes
0 answers
981 views

SQL Geometry type and Geography type conversions/projections

I am working with a replica database managed in Sql Server Management Studio 2016. My geographic data of points, lines, and polygons are projected in WGS_1984_UTM_Zone_17N Meter and SRID of 32617. Its ...
KWoosley's user avatar
1 vote
2 answers
427 views

Does transforming postGIS geographic data to EPSG:4326 , makes them geographic?

I am reading this about "Clustering on Indices" and in 25.2 says that The geohash algorithm only works on data in geographic (longitude/latitude) coordinates, so we need to transform the ...
slevin's user avatar
  • 1,129
1 vote
1 answer
926 views

How does Geoserver compute bounding boxes from data?

When creating a layer, Geoserver has the option of calculating bounding boxes from the data. I have only succeeded in doing this when I pass a Geometry type object in my SQL query. How can I define ...
medley56's user avatar
  • 365
2 votes
1 answer
577 views

What is ST_Geometry, ST_Curve and ST_Surface on PostGIS?

I dont't have any experience with geographics databases so I hope that you be patiente with me, so I opened this question (PostGis and datatypes WKT) in the past week about the datatypes in the ...
singleMan's user avatar
1 vote
0 answers
788 views

How to implement Geography or geometry with spatial index implementation to find entities in the bounding box?

I have entities saved in SQL table with Lat and long values. I added another column to store Geometry values. Code for updating Geometry column UPDATE [dbo].[table] SET [GeoLocation] = geography::...
Rohan's user avatar
  • 11
6 votes
2 answers
579 views

Finding format/type of the vector geometry

Does anybody know what format is the following element? 01000000804AE9B78F8F0D416258AE25F8E45141 It looks like WKB or PostGIS geometry/geography but I didn't manage to convert it. It has to be point ...
Lyubomir Klyambarski's user avatar
3 votes
1 answer
2k views

Distance from point stored in geometry with SRID 4326

I have stored 2.5 million data points (addresses) using the geometry data type in column latlong with SRID 4326. The latlon - column has a GIST index defined. I would select all addresses within a ...
JohnDoe's user avatar
  • 145
1 vote
2 answers
699 views

Combining different geometry types in ArcGIS for Desktop?

Two geodatabases have been created using split by attribute tool from CAD drawing file. One gdb is from polyline layer and another from polygon layer of input drawing file. I want to combine ...
siva's user avatar
  • 11
2 votes
1 answer
2k views

Convert data type from bytea to polygon psql

I was trying to convert data type of my column from bytea to polygon, ALTER TABLE polygon ALTER COLUMN geom type polygon using geom::polygon; But I got an error saying cannot cast type bytea to ...
moffittime's user avatar
1 vote
0 answers
336 views

Difference between adding spatial layer from MSSQL through "browser" and "add MSSQL table"

So I am trying to pinpoint the difference of adding layers from MSSQL Database that contains spatial layers like geography and geometry. I have noticed that when adding from the browser it retains it ...
Gonzalo68's user avatar
1 vote
1 answer
2k views

SQL Server geometry vs. geography in Esri map service

We have a SQL Server 2008R2 database where point coordinates are stored as decimal degrees. I want to create an Esri map service which shows those points. As the point data is dynamic I decided to ...
Marcin's user avatar
  • 1,821
3 votes
1 answer
953 views

SQL Server Geography Query works but Geometry Query Does Not - Different Tables, Similar Schemas

I am trying to get a Geometry query to work. A similar Geography query works fine but I must work with a table that uses a Geometry type. Although the Geography version returns lots of records as ...
Chris Currie's user avatar
1 vote
1 answer
767 views

Changing ArcSDE binary formatted data to MSSQL Geography or Geometry data types? [closed]

We are currently using ArcSDE 9.3 to store our Geodata. In a project which is currently being implemented, the software being used can access most data formats including the ArcSDE binary format and/...
Robert Buckley's user avatar
72 votes
1 answer
64k views

Choosing SRID and what is its meaning? [closed]

I'm new to GIS, in PostGIS, and I'm struggling with the SRID concept. How do you choose a SRID for a database column? This is making me crazy. Why do I need to choose a SRID? What's its meaning? ...
bluish's user avatar
  • 901
3 votes
1 answer
4k views

PostGIS get geometries within a radius of n meters using WGS84 [duplicate]

select * from zones z where st_intersects(z.geom, st_Buffer(ST_SetSRID(ST_Point(2.336031, 48.863172), 3857),1)); It looks like the 1 in the st_buffer is being interpreted as degrees, I need to find ...
Gary's user avatar
  • 133
17 votes
3 answers
15k views

Using geometry rather than geography data types in SQL Server Spatial?

Historically I've mainly worked with simple latitude and longitude coordinates in a SQL Server. I stored them as a geography datatype in SQL Server, and rendered them on a variety of displays (...
Eric's user avatar
  • 343
5 votes
1 answer
4k views

Is it possible to get coordinate system name from SQL Server geometry type?

I need to get the name of the coordinate system of a geometry type field in SQL Server 2008 R2 (for example NAD_1983_UTM_Zone_14N or GCS_WGS_1984 or other). Is this possible?
Dr. Greenthumb's user avatar
12 votes
5 answers
24k views

Extract lat/long from native PostgeSQL point type column

In my table I have a column location that is a point. I tried this: SELECT ST_X(location), ST_Y(location) FROM locations; But I still get the error message: ERROR: function st_x(point) does not ...
George Hown's user avatar
1 vote
2 answers
4k views

ST_DWithin uses Geometry or Geography type

assuming I use the following query to match the locations to a poi within 10km distance: SELECT poi.poi_id, h.loc_id, (ST_Distance(poi.geom,h.geom)*111.111) as distanceinkm FROM iut_poi_transl AS poi,...
hoge6b01's user avatar
  • 1,118
3 votes
3 answers
2k views

Purpose of geography_columns and geometry_columns views in PostGIS?

Can anyone tell me what is the purpose of geography_columns view and geometry_columns view in a PostGIS database? My geography_columns view is empty so I can't see what the purpose of it is.
sam's user avatar
  • 237
4 votes
4 answers
8k views

Performing SQL Server Geometry to geography conversion?

I have imported a number of Shapefiles from the ordnance survey using shape2SQL These have been imported as geometry however i would like to convert them to Geography and specifically to srid 4326 ...
RoughPlace's user avatar