Questions tagged [geometry-data-type]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
81 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 ...
  • 105
2 votes
1 answer
61 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 ...
2 votes
1 answer
146 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( ...
  • 123
1 vote
1 answer
387 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 ...
  • 1,141
2 votes
2 answers
2k 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 ...
0 votes
1 answer
134 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 ...
8 votes
1 answer
1k 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 ...
  • 55.1k
1 vote
2 answers
119 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({ ...
  • 161
1 vote
1 answer
1k 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. ...
6 votes
2 answers
442 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 ...
3 votes
3 answers
889 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 ...
  • 83
1 vote
0 answers
30 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 ...
  • 3,508
1 vote
0 answers
282 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 ...
  • 19
3 votes
0 answers
81 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 ...
  • 405
4 votes
1 answer
96 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. ...
  • 1,548
5 votes
1 answer
273 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. ...
  • 413
1 vote
0 answers
435 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 ...
  • 11
4 votes
1 answer
384 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. ...
  • 28k
1 vote
0 answers
136 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, ...
  • 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 ...
8 votes
0 answers
675 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 ...
0 votes
0 answers
764 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." ...
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 ...
  • 3,463
6 votes
1 answer
3k 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 ...
  • 435
2 votes
0 answers
923 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 ...
1 vote
2 answers
349 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 ...
  • 1,119
1 vote
1 answer
740 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 ...
  • 325
2 votes
1 answer
511 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 ...
1 vote
0 answers
722 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::...
  • 11
6 votes
2 answers
563 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 ...
1 vote
2 answers
657 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 ...
  • 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 ...
1 vote
0 answers
332 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 ...
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 ...
  • 1,811
3 votes
1 answer
909 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 ...
1 vote
1 answer
752 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/...
70 votes
1 answer
60k 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? ...
  • 881
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 ...
  • 133
16 votes
3 answers
13k 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 (...
  • 333
11 votes
5 answers
20k 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 ...
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,...
  • 1,088
3 votes
2 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.
  • 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 ...
27 votes
2 answers
26k views

Converting from Geography to Geometry data type in PostGIS?

I have a shapefile that has geography types. Can I convert it with a tool like shp2pgsql or is there a postgis function to do that?
  • 1,378
105 votes
4 answers
37k views

What are the pros and cons of PostGIS geography and geometry types?

My company uses geometry (the_geom) data type for storing geospatial data. I've recently been acquainted to the concept of geography (the_geog) data type which, as I understand it, stores the SRID ...
  • 6,720