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.

339 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
0 answers
805 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
5 votes
0 answers
721 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:...
ReutKeller's user avatar
  • 2,047
4 votes
0 answers
804 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 ...
William Powell's user avatar
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)....
Steven Kay's user avatar
  • 20.3k
4 votes
1 answer
993 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 ...
Stephen Lead's user avatar
  • 21.1k
3 votes
1 answer
114 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 ...
Renan_Bassetto's user avatar
3 votes
0 answers
320 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/...
eMka's user avatar
  • 31
3 votes
1 answer
337 views

Optimising Large Spatial Queries in SQL

I'm sure similar answers have been given elsewhere but no matter what I have tried I am unable to optimise this query. Details: TableA has 3.5mill records TableB Had 57000 records but I have ...
Jay Edwards's user avatar
3 votes
0 answers
491 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....
Jane's user avatar
  • 1,066
3 votes
0 answers
83 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 ...
monica's user avatar
  • 43
3 votes
0 answers
750 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 = ...
dmjf08's user avatar
  • 1,097
3 votes
0 answers
2k views

What is geometry(4326), and can you do Cartesian calculations with unprojected ellipsoidal coordinates?

I know Geography(4326) is an unbounded, and unprojected, and covers the entire world with ellipsoidal coordinates. I get that the math on this system is done on a spheroid. I also get that with a ...
Evan Carroll's user avatar
  • 7,031
3 votes
0 answers
274 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/...
ImanolUr's user avatar
  • 1,103
3 votes
1 answer
2k views

Removing vertex from Polygon geometry in OpenLayers 5

I could able to remove the recent modified vertex of a feature using removePoint method of modify interaction, as well as using deleteCondition event of modify interaction. However, that is not what I ...
Suraj's user avatar
  • 619
3 votes
0 answers
1k 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 ...
shahzad ise's user avatar
3 votes
0 answers
465 views

Building footprint polygon simplification / generalisation

I'm looking for implementations of polygon simplification algorithms that preserve topology and overall rectilinearity. The input data is building footprints which often have squarish protrusions and ...
Julian Rosser's user avatar
3 votes
0 answers
507 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 ...
Caffeinated Crow's user avatar
3 votes
0 answers
706 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 ...
April JIANG's user avatar
3 votes
0 answers
273 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)...
JB27's user avatar
  • 41
3 votes
0 answers
531 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 ...
khajlk's user avatar
  • 1,081
3 votes
0 answers
627 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) ...
Kapeppa's user avatar
  • 61
3 votes
0 answers
426 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 ...
Robert Denne's user avatar
3 votes
0 answers
108 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 ...
Alex K's user avatar
  • 151
2 votes
0 answers
34 views

QGIS converting MultiPolygon to MultiSurface - can I disable QGIS from doing this?

I have MultiPolygon data stored in a PostgreSQL DB (13.9) and am editing this through QGIS (using 3.28.3-Firenze). Occasionally when editing, some features are saved back as MultiSurface features. ...
G_BOP's user avatar
  • 21
2 votes
0 answers
115 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
2 votes
0 answers
60 views

Selecting geographically identical (underlying) line segments and offset them in QGIS

My project has three lines representing three routes along town streets. All three routes lie on the same street for part of their lengths; two of them lie on the same street for another part of their ...
Catlike's user avatar
  • 1,076
2 votes
0 answers
172 views

QGIS: Calculate distance between two point layers based on matching ID

I have two point vectors in QGIS. One contains several coordinates, which are grouped geographically by a reference in the field name PID. I also have a point vector of the centroids from each group ...
MrBeardo's user avatar
2 votes
0 answers
100 views

PostGIS 3.3, ST_DWithin Query - "lwgeom_distance_spheroid returned negative!" by changing third arg? Postgres 11, Ubuntu 20.04

The unexpected error: lwgeom_distance_spheroid returned negative! By making a tiny change in the third argument (distance) to ST_DWithin, we get an error in one version but not another. In other words,...
David Chun's user avatar
2 votes
0 answers
17 views

Reconstructing the original geometry of an object by using negativ and positiv buffers

I have serveral objects with a "thin" geometry which are connected by a very slim passage. My goal is to remove this connection so the object is devided into two separeted features. My idea ...
Radde1683's user avatar
  • 193
2 votes
0 answers
101 views

Exporting curved geometries as a GPKG with linear geometries

I have a layer (based on PostGIS or GPKG) containing complex, curved geometries (think MultiSurface(CurvePolygon(CompoundCurve(CircularString(...). How can I export this layer as a new GeoPackage that ...
bugmenot123's user avatar
  • 10.8k
2 votes
1 answer
243 views

Overlaps function in GeoPandas/GeoSeries is not working

There seems to be wrong with the overlaps function. Suppose I have this GeoDataFrame consisting of LineString geometries only with crs='EPSG:3347: Then I went ahead to extract only the first row's ...
M. Fire's user avatar
  • 31
2 votes
0 answers
139 views

Automatically update geometry from attribute

Using the field calculator one can update the geometry of a feature in dependence of one of its attributes. The process is described in Updating feature geometry from attribute fields in QGIS My goal ...
Robert's user avatar
  • 21
2 votes
0 answers
231 views

Cannot add geometry layer to QGIS although geometry column is recognized

The geometry column POINT in the View (not Table) View_MyGeometry is generated in the SQL database GeoData with Microsoft SQL Server Management Studio. QGIS recognizes this column as a geometry column ...
stonebe's user avatar
  • 445
2 votes
0 answers
190 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, ...
bark's user avatar
  • 21
2 votes
0 answers
51 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 ...
Chris's user avatar
  • 21
2 votes
0 answers
57 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. ...
Mark's user avatar
  • 935
2 votes
1 answer
816 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 ...
Ben Hendel's user avatar
2 votes
0 answers
386 views

Compute the distance from a point to polygon given the point and direction

I want to compute the distance from a point to a polygon given the point and direction. Currently I am using shapely and defining a "somewhat" infinite line string. This is not ideal as I ...
jlcv's user avatar
  • 345
2 votes
0 answers
282 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 ...
jlcv's user avatar
  • 345
2 votes
0 answers
193 views

Geometry error present only when writing shapefile to disk in QGIS

I have a complex shapefile that I am trying to use for a Difference spatial operation in QGIS (Madiera 3.4). When doing that I received an invalid geometry error. Using the QGIS Check Validity tool ...
brobertsp's user avatar
2 votes
0 answers
261 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 ...
Steffan's user avatar
  • 518
2 votes
0 answers
232 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) ...
geofee's user avatar
  • 631
2 votes
0 answers
56 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 ...
Mark's user avatar
  • 935
2 votes
0 answers
58 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 (...
pyGisServer's user avatar
2 votes
0 answers
91 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 ...
Eleanor's user avatar
  • 21
2 votes
0 answers
64 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 ...
Alvaro Morales's user avatar
2 votes
0 answers
148 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 ...
Kay's user avatar
  • 31
2 votes
0 answers
138 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, ...
William Entriken's user avatar
2 votes
0 answers
200 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 ...
Sara's user avatar
  • 21
2 votes
1 answer
68 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 ...
Christina 's user avatar

1
2 3 4 5
7