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.
1,852
questions
2
votes
1
answer
58
views
Backup table does not replicate geometry, fed by trigger in pgAdmin (postGIS)
I have two tables, A and B. B is a backup of A.
Table A has a trigger:
CREATE OR REPLACE TRIGGER trigger
AFTER INSERT OR UPDATE OR DELETE
ON A
FOR EACH ROW
EXECUTE FUNCTION ...
1
vote
0
answers
68
views
Road data merge weather condition
I have a shapefile that shows fog, wind and precipitation values between 1 and 5. Additionally, this file consists of grids. My goal is to segment the OSM road data that fall into these grids in ...
4
votes
1
answer
108
views
Making building orthogonalized in QGIS
From the left polygon to right polygon, May I know how to achieve it by using QGIS?
I have tried the orthogonalized tool in QGIS, but there is no change in shape.
8
votes
7
answers
17k
views
Convert 3D WKT to 2D Shapely Geometry
I have the WKT of many linestrings which contains three dimensions, however my script only requires a two dimensional linestring and I therefore want to discard the third dimension.
My current code, ...
0
votes
1
answer
2k
views
Converting a WKT column to type Geom
I have the following table in my MariaDB database:
This table contains a column called 'coordinates' (type: LONGTEXT) with a wkt representation of either a MultiPolygon or a Polygon. I am attempting ...
-1
votes
2
answers
124
views
Locate or find holes tool in QGIS for polygon shapefiles [closed]
I want to locate or highlight all the holes (invalid interior rings that do not connect at all vertices and edges) and redundant geometry in a polygon shapefile in QGIS so that I can go back and ...
1
vote
1
answer
73
views
Intersection between polygons. Is gpd.sjoin adjustable?
I am looking to intersect two polygons. See picture below:
The intersection is between the pink polygon (the small one) and the purple polygon (the bigger one). My issue is when I do the intersection ...
0
votes
1
answer
731
views
How to determine the order of shapely's intersection function between two LineStrings
I want to find all the Point intersections between two shapely LineStrings. It is possible that there are multiple intersections and hence the output can be a MultiPoint. How do I know that the output ...
5
votes
3
answers
17k
views
"AttributeError: 'GeoSeries' object has no attribute 'coords'" when accessing coords property of LineString using GeoPandas
How can I access the .coords property of a LineString in GeoDataFrames?
I can access other properties, such as area, length, etc, as documented in the Shapely's documentation. See reproducible example ...
0
votes
1
answer
20
views
Obtain specific geometry type when connecting to WFS through Arcgis Pro
I connect to the WFS and I successfully receive Polygons, as this seems to be the first geometry type it creates, but this WFS also has lines and points. How to specify the type of geometry I want to ...
1
vote
1
answer
265
views
ArcPy insertRow asking for a sequence of values
I've got code that pulls the center point from a layer, and places it in a new feature class as part of a more complex analytical process.
I'm trying to get the centroid written to an in_memory ...
2
votes
1
answer
113
views
How to extract the overlay line geometry length using geopandas?
How can I extract the length of line geometry that is overlying each hexagon of h3?
Sample Working Example:
import h3
import geopandas as gpd
import matplotlib.pyplot as plt
import pandas as pd
import ...
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 ...
1
vote
1
answer
709
views
Creating a Point with SRID - MariaDB
I have a table containing a longitude and latitude (as doubles) in MariaDB. What I'm trying to do is create a point with a specific SRID - 4326. The current way that I create a point is by using the ...
1
vote
1
answer
888
views
How do you make a GEOMETRYCOLLECTION valid in SSMS?
The following query is used in an app to make shapes valid, however it does not work when using GEOMETRYCOLLECTIONs. I get the following error:
A .NET Framework error occurred during execution of user-...
2
votes
1
answer
193
views
Copy geometry only from one feature class to another based on condition
I'm trying to use ArcPy to copy only the geometry from one feature class to another based on a certain condition. Here is my code so far:
source_fields = ['contition_field', 'SHAPE@']
icursor = arcpy....
4
votes
2
answers
402
views
Smoothing corners in polyline using PyQGIS
I have an array of QgsPointXY that makes a line with lots of vertices.
How can I round the corners?
Here is what I mean:
The code is:
def __round(line: list[QgsPoint], radius: float) -> ...
3
votes
0
answers
287
views
Measuring orthogonal distance of line from point in QGIS [closed]
I am fairly new to QGIS.
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) of lines, L1 and L4. ...
9
votes
4
answers
3k
views
Replacing existing geometry in QGIS 3
In QGIS 3 does anyone know how to copy the geometry of one feature and paste it into another selected feature to just override the geometry?
Within PostGIS I did this with an update, but I'm looking ...
2
votes
2
answers
181
views
Fixing holes in the buffered polygon using PyQGIS
My script uses a buffer and dissolves to create polygons around my points. However, there are holes in between the points. I do not want to increase the distance because then it will also cover the ...
1
vote
1
answer
177
views
Converting layer with multiple geometry types into single layers using PyQGIS
I'm developing a standalone script in PyQGIS and have downloaded data from OpenStreetMaps via Overpass Turbo. The data is given as GeoJSON and has been converted to gpkg. It contains multiple ...
25
votes
7
answers
49k
views
Filling holes in polygons using QGIS
Is there an option in QGIS to fill holes in polygons automatically by setting parameters e.g. maximum area, distance between borderlines?
I want to delete/fill holes that a very "thin"/small....
0
votes
0
answers
57
views
How to extract the Lat and Long coordinates used to create the boundaries of polygons in a shapefile using QGIS
I have a shapefile that contains 10 polygons that represent 10 legal fishery management zones. I would like to extract the latitude and longitudinal data points used to create each polygon so that I ...
0
votes
1
answer
313
views
Read GeoJSON object in a CSV file column and transform it to geometry
I have a column ('geo_shape') that contains GeoJSON object type of linestring geometry and, so far, I didn't manage to read and transform it to a GeoPandas/shapefile type of geometry.
Here is a way ...
0
votes
1
answer
181
views
Raster to Point in ArcMap: export raster data to a point shapefile with geometry of a given point shapefile
I want to export a calculated raster to a point shapefile with predefined geometry (i.e. positioning and extent of the points). Points not covered by the raster should return empty values (e.g. NoData)...
4
votes
2
answers
2k
views
Connecting two nodes with line to close segment in QGIS
I have a line that I drew where the ends are not connected. I now want to select the two end nodes and hit a button to have QGIS connect them with a line segment. How do I do this?
2
votes
1
answer
95
views
Generating offset line from MultiLineString in QGIS
I have a MULTILINESTRING in my CSV file, and I want to generate a copy of it offset to the right by a few meters. I've run Single Sided Buffer, and Offset Lines, and neither of them seem to generate ...
0
votes
1
answer
583
views
Geo search MySQL table for rows that are within proximity
I have an sql table that has some data on retail locations with lat, long coordinates. My application queries the table to pull the data using python. Here's some sample data:
table1
id name lat ...
0
votes
1
answer
350
views
Unable to insert geometry point using TypeScript and MassiveJS
I am trying to simply trying to validate a point before I actually insert it into the db.
I am using the following:
TypeScript: 3.5.2
MassiveJS: 6.4.0
PostgreSQL: 11
PostGIS: 2.5
const ...
1
vote
1
answer
426
views
Automatically running an ST_AsText query over multiple rows in QGIS
After my SpatiaLite database got corrupted, I used a recovery tool to recover what was lost. I now do have the database, but I can't visualise the features on a map.
I figured out that with SELECT ...
6
votes
2
answers
116
views
Is there a common method for measuring "curviness" of a line?
I have a bunch of GPS tracks in a Postgres+PostGIS database and want to extract a single metric as a measure of turns shown in the data. Some of the GPS targets travel in almost straight lines while ...
143
votes
14
answers
75k
views
What are Definition, Algorithms and Practical Solutions for Concave Hull?
Convex Hull
A convex hull of a shape is defined as:
In mathematics, the convex hull or convex envelope for a set of points X in a real vector space V is the minimal convex set containing X (Wikipedia)...
1
vote
1
answer
1k
views
Finding intersection length between two polygons using PyQGIS?
I have two polygons and I want to find the intersection line length between these polygons.
for geom1, geom2 in itertools.permutations(selection, r=2):
intersection =geom1.geometry().intersection(...
1
vote
0
answers
69
views
How to recognise building type from polygons?
I have a number of building polygons which are extracted from the aerial images, along with their postal address. (The aerial images are not available in my case.) For example, the polygon of a square ...
7
votes
1
answer
209
views
Check Geometries Plugin - attribute value in results
What does the real value of Sliver polygon represent?
it's not the area of the polygon
it's not the perimeter
is not the area of the bounding box
so I ask if anyone can tell me what it represents, I ...
2
votes
0
answers
53
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. ...
0
votes
1
answer
44
views
How to find if a point feature is snapped to a line using ArcObjects
Background to the problem:
When I use the Editor Split tool on a line, the line gets split into 2, and a junction is placed between the two lines. When I use the Editor merge tool, the 2 lines are ...
1
vote
1
answer
465
views
Align set of satellite images
I have a problem my set of four satellite images (4 different years of observations) of the same area are not aligned and more than that I see that there is a distortion problem also.
I found this ...
33
votes
1
answer
52k
views
Storing GeoJSON FeatureCollection to PostgreSQL with PostGIS?
I am new to GeoJSON. I have a GeoJSON features collection as shown and would like to store it in postgres table (testtable). My postgres table has a serial id and geometry column.
{
"type": "...
-1
votes
1
answer
50
views
Error in gpd.join related to 'PyGEOSSTRTreeIndex'
I have an error related to gpd.sjoin which shows as follows
NameError: name 'PyGEOSSTRTreeIndex' is not defined
Here is the code:
alltitresQuartiers = gpd.sjoin(left_df=transactions_located, right_df=...
5
votes
3
answers
595
views
Finding the name of the geometry column for QgsVectorLayers using PyQGIS
I have a QgsVectorLayer whose data source is a vector GeoPackage file. How can I find the name of its geometry column?
It is possible to use ogr to get it, but I am looking for a native PyQGIS ...
0
votes
1
answer
90
views
Calculating distance between two points on line string
I have a line string and two points with me. I need to understand how to calculate the distance between two points along the provided line string. Also, note that in some cases, the provided points ...
1
vote
1
answer
109
views
City Suburbs Polygon using OSMNX
I am trying to do something similar to the question OSMNX - City Suburbs Polygons. The city of Panama, in the Republic of Panama, is composed of corregimientos (like a borough). I am trying to get the ...
1
vote
1
answer
54
views
How to extract polygon attribute based on point location using QGIS expressions
I'm using QGIS 3.34. I have a point layer that contains a single point showing a site location (called "Site Location"). I have a polygon layer covering the UK with 12km squares containing ...
2
votes
1
answer
78
views
Multiple operations within Field Calculator using the same IF statement
I have 2 layers (Point_Orien_Vert - red points and Point_Centroides - green points), both are Point Geometry.
I need first to check if the distance between one feature in Point_Orien_Vert and one ...
0
votes
0
answers
147
views
QGIS Convert Polygon ZM to Polygon
QGIS Convert Polygon ZM to Polygon
Received files that have Shape > PolygonZM I need to attach to Polygon. QGIS: Geometry >< Polygon (MultiPolygonZ)
I managed to get it to Geometry >>&...
16
votes
2
answers
5k
views
Difference between QgsPoint, QgsPointXY and QgsGeometry.fromPointXY() in PyQGIS
I am using PyQGIS. What is the difference between:
QgsGeometry.fromPointXY(QgsPointXY(x, y))
QgsPointXY(x, y)
QgsPoint(x, y)
When I print these three options, I get:
print(QgsGeometry.fromPointXY(...
6
votes
2
answers
1k
views
Creating geometry less memory layer using PyQGIS
I'm writing a QGIS plugin and I need to create a table with some attributes that, in a second moment, I'll load in a SpatiaLite database.
The table is created as a memory layer, but as I said, it is ...
8
votes
4
answers
4k
views
How to determine if an object is a circle
I have a polygon shapefile that consists of many different shaped features. I would like to identify only those shapes that are circles. Is there a way to do this? Is it a calculation I could do in ...
0
votes
1
answer
34
views
Apply Edits on ArcGIS not updating geometry
I am using this command on ArcGIS
curl --location 'https://services8.arcgis.com/xxxx/arcgis/rest/services/SM2/FeatureServer/0/applyEdits' \
--header 'X-Esri-Authorization: Bearer ...