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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Batch-replace geometries from one FC to another (via related IDs)

ArcGIS Desktop & Enterprise 10.7.1 — Oracle 18c — SDE.ST_GEOMETRY I have a polyline FC called FC-A. And I have an additional polyline FC called FC-B. I want to update the shapes in FC-A with the ...
4 votes
1 answer
43 views

Feature without geometry in Geopackage layer

I am working on a QGIS project where I have a layer called "Developments" within a Geopackage document. The layer is a polygon layer where I add all renewable energy projects within my ...
1 vote
1 answer
38 views

Filter shapefiles - keeping inside parts only

I'm quite new to GIS so sorry if this is a daft question - is it possible to filter out non-overlapping parts of a shapefile? I have a boundary shapefile which I would like to cover with small areas ...
0 votes
0 answers
32 views

Postgis 3.0: How to convert liblwgeom to librttopo? [closed]

We want to upgrade from PostGIS 2.x to PostGIS 3.x and take over a self-written library (.so). This library was compiled with liblwgeom of PostGIS 2.x. liblwgeom seems to be not part of PostGIS 3.x ...
0 votes
0 answers
26 views

Calculate angle between two furthest points

I need a way of automating this whole process rather than measuring the angle manually. I want to calculate the largest viewing angle from each of the viewpoints (red dots) in relation to the ...
0 votes
0 answers
13 views

Bringing in another layer in the Geometry Expression coding

Im looking to create a output triangle using the Geometry by expression tool. I have two layers, layer 1 is a viewpoint and central location and layer two is a collection of locations. I want make a ...
2 votes
1 answer
95 views

Cleaning overlapping polyline in QGIS [closed]

I have land use data as a polyline layer. Most of these polylines are overlapping at the common boundary. First of all, I want to clean them and get only one poly line feature, which does not overlap....
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 ...
1 vote
1 answer
193 views

Measuring area covered by linestring

I have a trajectory given by GPS which I store as a ST_LineString() and I'd like to know the area covered by the line string. I know the "width" of the trajectory, but I'm not sure how to approach the ...
4 votes
1 answer
11k 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 ...
2 votes
1 answer
26 views

Preserving None values in GeoPandas when dissolving (by="id", aggfunc="first", as_index=False)

If I dissolve two geometries with the same id and tell to aggregate the other attributes from the first geometry, I get the attributes values from the second geometry because the first is None. ...
10 votes
3 answers
7k views

Getting extent (bounds) of each feature using Fiona

I was looking in Fiona to get for each feature its extent but I didn't find how. I have try to far to do something like below import fiona with fiona.open('countries/ne_10m_admin_0_countries.shp', 'r'...
1 vote
2 answers
6k views

Python library or algorithm to generate arc geometry from three coordinate pairs?

I'm trying to write code to generate fixtures for a django/geodjango project. I need to generate geometry for arcs (line string) given three lat/long pairs; start of arc, end of arc and centre of arc. ...
1 vote
0 answers
34 views

Creating random points along polylines using ArcPy

I'm trying to draw random points along the polylines. The polyline layer and the number of points to create are given as input. My problem is that the points are being created for every single line ...
1 vote
0 answers
21 views

How to identify upper left point from column of points? [duplicate]

I have a column that contains points (all they make one tile) and I need to extract the upper left point based on point coordinates. Is there any built-in function in PostGIS to find? Otherwise, I am ...
2 votes
1 answer
83 views

How use QGIS Geometry Checker classes in python?

I write myself plugin for QGIS with Python3 API. For my plugin logic I need write my self geometry checker because of difficult logic and different actions when I find some of geometry errors. In ...
2 votes
1 answer
85 views

Fixing misshaped GeoJSON polygons [closed]

In 2018 Ghana changed its administrative divisions (from 11 to 16 regions, and from 216 to 260 districts). Unfortunately, I have not been able to find the GeoJSON (or equivalent) data for the new ...
0 votes
0 answers
49 views

Writing from file geodatabase to SQL Server 2017 instance using ogr2ogr

I'm attempting to import a large feature class from a file geodatabase to my SQL Server 2017 instance using GDAL. I have tried many different options on the ogr2ogr command and nothing seems to work. ...
1 vote
0 answers
17 views

Read CSV file with geotools library Java

I found in the geotools documentation this code for reading CSV file and extract geometry seems not working for me even with the data test they have in the web site. feature.getDefaultGeometryProperty(...
2 votes
0 answers
34 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, ...
3 votes
1 answer
52 views

Read xml with CurvePolygon with Geopandas / Fiona

I am trying to use the Dutch BGT Api via https://api.pdok.nl/lv/bgt/download/v1_0/ui/ with the following code: # Native import requests from requests.structures import CaseInsensitiveDict import json ...
0 votes
1 answer
595 views

Reading shapefile of road segments into Python data structure to get begin and end point coordinates [duplicate]

How can I take a shapefile that has road segments and read it into a data structure in Python that I can use to get begin and end points with? For example x, y to x2, y2. It's not a large shapefile, ...
8 votes
3 answers
302 views

Using buffer distance as portion of polygon variable width in QGIS

Is it possible to create a buffer of for example 3/4 of the polygons local width? I have a polygon of river body, somewhere the river has 20 meters in width, somewhere 70 m. I need to extract the ...
1 vote
1 answer
34 views

Script to extract start and end of polyline coordinates

I am writing a plugin and I need to extract the x1,y1,x2,y2 coordinates for a chosen Polyline. The GUI loads all the available layers, the user selects the layer and the GUI is populated with the ...
3 votes
1 answer
682 views

Add a new polygon to an existing shapefile from WKT in QGIS

I have a layer of polygons in QGIS; I want to add programmatically (PyQGIS) a new polygon to this layer using WKT. Example: mywkt = POLYGON ((522762 376413 0,530635 368671 0,522237 353713 0,522762 ...
2 votes
1 answer
36 views

Iterating over each pair of coordinates in Multipart geometry using Shapely

This question is related to Access each (x, y) within Multipart gdf.geometry.interiors. With a MultiPart geometry.interiors: from shapely.geometry import Polygon exterior = [(2, 8), (7, 8), (7, 3), (...
0 votes
0 answers
22 views

Construct ST_GEOMETRY rectangle from two vertices: lower-left and upper-right

Oracle 18c SDE.ST_GEOMETRY 10.7.1 EGDB: I have two vertices of a rectangle: Lower-left: 10,10 Upper-right: 100,100 I want to construct a rectangle polygon from those two vertices using ST_GEOMETRY ...
7 votes
3 answers
2k 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 ...
0 votes
2 answers
636 views

Converting the shapefile of google drive to geometry of GEE in Colab

I uploaded district's shapefile into google drive, and then read it from google drive using the below method: import geopandas as gpd shapefile = gpd.read_file("shapefile.shp") But I want ...
16 votes
3 answers
50k views

Removing duplicate features with same geometry in ArcMap?

Is it possible to uniquely identify each geometry in a feature layer? Essentially I have a polygon feature layer with many rows of data represented by the same geometry. I would like 1 row for each ...
0 votes
0 answers
28 views

Receiving Infinity in LineString using shapely and pyproj

I am try get linestring so I can measure the distance and time. Here in this linestring I am getting nan distance and time. data: path = [[29.87819, 121.54944999999998], [24.23111845, 119....
2 votes
1 answer
241 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 ...
-1 votes
1 answer
27 views

Transferring XY coordinates of point from one feature class to point in second feature class using ArcPy

I have a small list of points, testingPoints, that need their geometry (x and y points) transferred to points within a larger dataset, baseCentroids. The datasets share a common field POINTID to help ...
0 votes
0 answers
44 views

Unsupported geometry type 'Unkown type' in Layer - Unable to load project in QGIS

This is a seemingly simple issue but I can't seem to fix it. When I load my project in QGIS, I get an error message that says: "Unsupported geometry type 'Unknown type' in Layer ''. When I click &...
4 votes
1 answer
109 views

Convert bytea to geometry column with PostGIS

I am trying to create a geometry column from bytea. I imported OSM data using ogr2ogr using the command ogr2ogr -f PostgreSQL -nln bahamas_multipolygon PG:"dbname=openstreetmap user=postgres ...
11 votes
4 answers
544 views

Deleting small holes in polygons specifying the size with PostGIS

I have a big MultiPolygon layer in which I want to delete holes smaller than 100m². QGIS do it well and fast with the algorithm "native:deleteholes", but I need to use it as part of a SQL ...
0 votes
0 answers
50 views

How to smooth the Linestring after adding additional point?

Actually I am tracking vessel, where I am already having path, and current position. Now the trouble is, obviously the vessel will not be on same coordinates as provided in the path.So I want to ...
0 votes
1 answer
221 views

How can I import assets of type folder shared by my co-worker?

I am very new to Google Earth Engine. My coworker shared his asset folder with me but as i open the link it gives me an error that "Unable to import asset of type folder".
0 votes
0 answers
11 views

Setting to the same ViewPoint yields different result ESRI C#

I'm trying to implement some zoom-in/zoom-out feature in my program, for this I'm using two ViewPoints with WGS84 projection, one is default and other one is current, when I return to the default one ...
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 ...
0 votes
0 answers
24 views

QGIS: unable to get geometry from WFS

I try to add bicycle lanes (TRASY_ROWEROWE) from a WFS layer from this server: https://wfs.um.warszawa.pl/serwis. After connecting and loading, the layer appears only as an attribute table, but with ...
1 vote
1 answer
34 views

Set point geometry of a list of points in PYQGIS

I want to create a temporary point layer from a list of points. The point list is: arr_error = [[547162.6286000004, 187063.95659999922]] vl = QgsVectorLayer('Point', 'Error_point', 'memory') pr = ...
0 votes
1 answer
61 views

Clip lower value polygons with larger value polygons in shapefile

I have a dataset of circular polygons that correspond to tree crowns. Many polygons overlap with each other, and some are even completely covered by larger polygons (or larger polygons covered by many ...
2 votes
2 answers
325 views

PostGIS MakeLine issue

I am using GPS coordinates and I am trying to create lines (routes) from lon,lat. I create a geography column from my point and then I create the line as following: ST_MakeLine(point_geom order by ...
1 vote
0 answers
37 views

Issues splitting a polygon layer by line

So we have a problem, and we can't a find solution. if feat_L.geometry().intersects(feat_P.geometry()): success, splits, topo = feat_P.geometry().splitGeometry(feat_L.geometry().asPolyline(), True)...
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 ...
3 votes
3 answers
1k views

How do you flip/invert/reverse the order of the coordinates of shapely geometries?

Is there a generic way to flip/invert/reverse the order of the coordinates of a shapely geometry? Here are a couple of examples of what I mean. Example 1 Input: LINESTRING (0 0, 1 1, 3 1, -3 3) Output:...
1 vote
1 answer
95 views

T-SQL convert a string to geometry data type

I want to convert a string to geometry data type using the following statement: ALTER TABLE tablename ALTER COLUMN geometrie TYPE geometry(Point) USING st_astext(geometrie); I get error: Msg 102, ...
0 votes
0 answers
24 views

Finding Maximal lines from multiple parallel lines

I have a lot of parallel lines in a list, and I am looking for a way to get the maximal lines that include individual lines. For example, let's say I have 10 lines. l1 = LineString(((0, 0), (8, 8))) ...
0 votes
0 answers
21 views

Geometry error with QGIS

I create rectangles from the tool "Rectangles, ovals, diamonds" on a layer (shapefile) of type point that I created before. Because I need to create rectangle with specifics dimensions then ...

1
2 3 4 5
34