Questions tagged [geometry]

(1) abstract geometry; (2) storing geographic data in projected coordinates; (3) a generic ESRI term for vector features; a class for "geometry" objects.

322 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
538 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 ...
user avatar
5 votes
0 answers
431 views

QGIS geometry error:Hole lies outside shell

I am using QGIS 3.8 and I am using a layer from OSM of Tokyo city. The layer is consisted from many polygons and I have tried to merge it but I got error. This is how the original layer was look like:...
user avatar
  • 1,807
4 votes
0 answers
2k views

how to orthogonalize building outlines

I'm looking for a way to orthogonalize building outlines which I've extracted from a high-res DEM. I'm using the FOSS GIS stack (QGIS, GRASS, SAGA, PostgrSQL, PostGIS) and can code in Python (or Java)....
user avatar
  • 19.8k
4 votes
1 answer
858 views

How to offset/displace overlapping lines in a web map?

I have a dataset of points representing a To/From status - something like distribution centres and delivery addresses. When the user clicks on a point I'd like to show the relationships between this ...
user avatar
  • 20.5k
3 votes
1 answer
26 views

How can I get the closest linestring in my database to the linestring drawn by some user, following a path?

I have to take a geometry drawn by an user and return the geometry in my database that represents the drawing. I tried in PostGIS In my database I have a column 'way' with the geometry that I want to ...
user avatar
3 votes
0 answers
194 views

QGIS Convert Shapefile to MSSQL as geography type

I am using QGIS 3.16 and SQL Server 2019. I have a shapefile loaded into the project. I have been able to successfully convert the Shapefile to a spatial dataset in SQL Server. My method for doing ...
user avatar
3 votes
0 answers
211 views

High cost of geometry bitmap heap scan

I have a PostGIS database with tables osm_admin (with contains all administrative boundaries from osm data) and osm_landusages (with contains all landuse areas form osm - like forests, industrial/...
user avatar
  • 31
3 votes
1 answer
884 views

Problem with dissolving polygon layer with many features in QGIS 3.4.1

I am currently working on a set of data that defines restricted areas for use of photovoltaic modules. This set of data amounts to 270.00 polygons in total (with their own geometry). For simpler ...
user avatar
3 votes
0 answers
203 views

Generate arc from projection coordinates

I have a mind to generate arc from given parameters: start point coordinates arcDistance arcBearing arcOrigin coordinates. My concept is, calculate the end point of arc (function geo.sphere....
user avatar
  • 1,015
3 votes
0 answers
73 views

Lines length plugin - QgsVectorLayer error

Several similar questions have already been made, but none of the is helping me. I have a layer of polygons and I want to known the length of each line of each polygon. And based on the length I ...
user avatar
  • 43
3 votes
0 answers
249 views

Create multipoint layer from array by expression

I have two layers. One shapefile point layer, called "point1" and one csv no geometry layer, called "Meta". "point1" looks like: id bd 1 a 2 b 3 c 4 d 5 e 6 f and so on... "...
user avatar
  • 25.6k
3 votes
0 answers
498 views

Calculate length of selected features in PyQGIS

I create a selection with getFeatures(QgsFeatureRequest()) and I want to calculate the length of the result which is a QgsFeatureIterator : select = QgsExpression(" myexpression ") selectedfeats = ...
user avatar
  • 859
3 votes
0 answers
206 views

ST_ApproximateMedialAxis producing strange outputs

My problem is as follows: I have some lines (yellow), that I want to merge in one line if they are at a certain distance (blue, buffer), and after a long research I found this function from PostGIS/...
user avatar
  • 1,043
3 votes
0 answers
869 views

How to plot geometry(MultiPolygon, 3044) QGIS based datatype in python

I have a table tb_regions in Postgresql having a column c_geometry which contains geometry(MultiPolygon, 3044) datatype from QGIS. I know how to retrieve data from Postgresql using pythons psycopg2 ...
user avatar
3 votes
0 answers
448 views

Dissolve fails, geometry errors, and cleaning problems

I fairly new to GIS, and I'm having an issue with dissolving a vector. To start, I'm running QGIS 2.14.15 on Windows 7 Pro. When I try to dissolve the polygons it creates a blank shapefile. All of the ...
user avatar
3 votes
0 answers
455 views

What does "Feature doesn't have a geometry" mean in QGIS?

When I open the .shp file and click on specfic item in the attribute table, in the canvas, it said "Feature doesn't have a geometry". Is it the same as "geometry is not valid", or does it simply mean ...
user avatar
3 votes
0 answers
241 views

How to measure orthogonal distance of line from point in QGIS?

As I am fairly new to QGIS I'm seeking your help. I'm trying to measure the distance between points in a point Layer P and the end of lines in a line layer L. In L there are two categories (attributes)...
user avatar
  • 41
3 votes
0 answers
456 views

Interpolating point to nearest polygons to compute street width in postgis

I am trying to calculate the width of streets (line.shp) in postgis using reference point (ref_point.shp) (yellow point features) and building polygons (building.shp). The red point features are the ...
user avatar
  • 1,039
3 votes
0 answers
536 views

Geometry issues when digitising in QGIS

I'm digitising a large number of maps from hand drawn mud maps and digital images, and although I have used the snapping tools ("snap to vertex and segment", Tolerance 10 pixels, avoid intersections) ...
user avatar
  • 61
3 votes
0 answers
413 views

What is the area that OGR extracts from the (geometry) shp files for polygons?

The ESRI July 1998 technical documentation for polygon shapefiles at page 10 makes no mention of either area measures or length measures (apart from byte/record-layout matters). Yet OGR enables me to ...
user avatar
3 votes
0 answers
105 views

PostGIS does not export shortest path to Shapefile

I am trying to draw a bunch of lines overlaying the globe map in a WGS84 projection. To this effect I have created a PostGIS DB with a table that has one column containing linestring data. My problem ...
user avatar
  • 151
2 votes
0 answers
35 views

Languages to represent ellipse geometry (WKB/WKT)

I am new to the idea of representing vector geometries in a text markup language. I am looking into different representations for geometries consisting of smooth curves and three dimensional objects, ...
user avatar
  • 21
2 votes
0 answers
21 views

Style rule based on feature adjacent edges and ignore vertices

I have a set of square tiles which I want to show in a different colour when the tile to the north, south east & west are present in the same way as below with the links I want in black. I have ...
user avatar
  • 21
2 votes
0 answers
37 views

How to make a projection of a linear layer on an another layer

I'd like to know how to make a projection of a complex linear layer on an another layer, overlapping their geometries perfectly and considering the extremities of lyr_1; using geoprocessing of QGIS. ...
user avatar
  • 661
2 votes
0 answers
159 views

Snap points to polygon/lines in python shapely?

I have a shapefile of point features And a shapefile of polygons features I would like to snap these points to the polygons, as they are often just outside the polygons and cannot be spatially ...
user avatar
2 votes
0 answers
61 views

Seeking Python library to check validity of 3D polygon

In the case of 2d polygons I have been using shapely: from shapely.geometry import Polygon Polygon(points).is_valid But for 3D polygons, shapely simply computes the validity in the x-y plane as ...
user avatar
  • 311
2 votes
0 answers
98 views

Measure length of shadow from object center in QGIS

I am trying to measure the length of object shadows in QGIS 3 in order to calculate the object's height. In order to know height (h) I will need to have: The length (l) of the cathetus (line from ...
user avatar
  • 448
2 votes
0 answers
76 views

"Snapped geometry has invalid geometry" error when snapping geometries to layer

I have two shape layers in QGIS where I want to use the "Snap Geometries to Layer". I get the error message that several polygons of the Reference layer have invalid geometries: Feature (1) ...
user avatar
  • 531
2 votes
0 answers
30 views

Compare two linear layers with geoprocessing tools

I'd like to know how can i have in output two layers, composed by one of the two layers in input, comparing the geometry and attributes of the 2 input layers (test_1 and test_2) using geoprocessing ...
user avatar
  • 661
2 votes
0 answers
47 views

Geometry Object geoprecessing fails

Theoretically, ArcPy geometry objects can be used as inputs and / or outputs in geoprocessing tools, just pass arcpy.Geometry() as an argument for outputs. However, I have come across several tools (...
user avatar
2 votes
0 answers
45 views

Calculating distances between buildings, plots and road network using geometry expression

I am trying to measure the distance between the edge of a building edge to the closest road within the buildings plot to see whether there is enough space for a Electric vehicle parking space. I have ...
user avatar
  • 21
2 votes
0 answers
44 views

How to automatically clean hollow lines in middle of polygons in QGIS?

I am trying to correct automatically this kind of errors. I already tried the tools v.clean (maybe I have to tune some parameters?) and correct geometries. I also tried dissolving, but since there is ...
user avatar
2 votes
2 answers
590 views

How to input geospatial data into MS SQL Server via Python and SQLAlchemy

I'm trying to add a GeoJSON file into the SQL Server database. I have this following script that works fine for inputting the geospatial data into MYSQL Database, thus creating a GEOMETRY type column ...
user avatar
  • 916
2 votes
0 answers
61 views

Geometry Type error preventing saving of layer after editing - geometry type is correct under layer information

I have a problem with a linestring layer that doesn't want to be saved after editing. The layer itself shows 'LineString' under the information tab. When I add a line with the tool by snapping the ...
user avatar
  • 31
2 votes
0 answers
48 views

Are latitudes -90 and +90 both valid in WGS84?

Geometrically, I understand that a sphere can be addressed in latitude and longitude on the ranges [-90, +90] and (-inf, +inf) respectively. However, I am working on the specification for plus codes, ...
user avatar
2 votes
0 answers
79 views

Points interpolation on a polygon geometry

I would like to know how to interpolate point data on a polygon geometry. I have two PostGIS tables: the first one contains hourly rain values evaluated in the nodes of a regular grid (specified in a ...
user avatar
  • 21
2 votes
0 answers
31 views

Check geometries distorting polygons when removing gaps

Using QGIS 3.10.9 with the check geometries plugin (v0.1), and I have a simple polygon layer as a test run with a deliberate gap. I use the check geometries plugin with the topology check 'check for ...
user avatar
2 votes
0 answers
50 views

Transfer data with 'geometry' to Elasticsearch

I would like to transfer my data which contains 'geometry' to Elasticsearch but I don't know how to change my 'body'. 'geometry' is the last column. What should I change? Code: es = Elasticsearch() ...
user avatar
2 votes
0 answers
118 views

Rotating vertices of geometries in QGIS

I have a great number of area geometries, and line- and point-geometries which have a geometric relation to the area. That means that the distance and the orientation of the lines/points to the areas ...
user avatar
  • 163
2 votes
0 answers
139 views

Invalid geometry type after clipping

I have two files (.xyz) with point data from a terrain. I'd like to create contour lines of said terrain but in a smaller area (limited by a polygon). After importing the points in two layers, I merge ...
user avatar
2 votes
0 answers
264 views

Unique constraint on Geometry to resolve INSERT conflicts

I have a simple table with a geometry column like so: CREATE TABLE geomtable ( gid serial, geom geometry, trip_count integer ); I want a unique constraint on the geometry column, such that ...
user avatar
2 votes
0 answers
47 views

Feature is visible in a layer but geometry is None in QGIS using Python

I am using the feature's geometry in a layer to get the centroid point of the polygon. One particular feature is visible in a TOC layer and also able to select a feature. But, while reading that ...
user avatar
2 votes
0 answers
92 views

Creating line geometry from latitude/longitude dictionary

I want to create LineString geometry between points, based on a latitude/longitude dictionary. My code worked in QGIS 2.x but in QGIS 3.x, my new shapefile is empty. I have replaced QgsPoint and ...
user avatar
  • 39
2 votes
0 answers
60 views

Problem with the correct calculate of the bisector of the angle

I have a problem with the correct calculate of the bisector of the angle. I use WGS84 projection. I have a bisector's bearing (azimuth), coordinates of start point and line length as input. Some ...
user avatar
2 votes
1 answer
83 views

Data matching between 2 layers which do not overlap

I would like to know how a vector layer can takes attributes of a field, of another vector layer which is not overlapping. For example, there are 2 vector layers, test_1 (2 records A,B) and test_2 (3 ...
user avatar
  • 661
2 votes
0 answers
206 views

Get length of a line stored in SQL Server Geometry column with srid 4326

I have some spatial data stored in SQL database geometry column called sp_geography (The field is defined as Geometry). The SQL below: f.sp_geography.STLength() returns, for example 0....
user avatar
  • 33
2 votes
1 answer
337 views

Error while exporting geometry to CSV with MMQGIS

I am importing a DIVA-GIS shapefile into QGIS. It has a lot of polygons on it. My aim is to group different groups of polygons together and dissolve their internal boundaries so that I end up with ...
user avatar
2 votes
0 answers
187 views

Selecting geometry from PostGIS compatible with Open3D

I have a cube stored as geometry in a PostGIS DB. I get the coordinates using the following SQL: select ST_AsEWKT(geom) from polyhedral.vol_1 where id = 1 This presents the following result. ...
user avatar
2 votes
0 answers
463 views

QGIS: Update geometry via geom_from_wkt('POINT(X,Y)') - how to correctly parse string columns?

The columns containing X and Y strings look like -1234,56 So far i tried: geom_from_wkt(concat('POINT(',replace("wbr_komplett.X",',','.'),',', replace("wbr_komplett.Y" ,',','.'),' )')) and also: ...
user avatar
  • 924
2 votes
0 answers
49 views

GDAL osgeo for python treating Z dimension differently

I have a space defined by a polyhedral surface, and I would like to check if a point is inside this space, and I would like to do this in python with gdal. After trying the default installation of ...
user avatar

1
2 3 4 5
7