Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
2
votes
1answer
1k views

Create geometry from WKT in FME

How to create geoemtry from WKT in FME? We have a csv file in WKT format: "ID";"GEOM" "1";"LINESTRING ( 15, 20 16, 20 21, 12)" "2";"LINESTRING ( 15, 20 16, 20 21, 12)" "3";"LINESTRING ( 15, 20 16, ...
0
votes
1answer
364 views

PostGIS update column with selected

I am new to database sorry if this is basic. I have selected point geometry from a geometry column in pgAdmin, however, I would like to know how to now copy the selected points to a new column? This ...
1
vote
3answers
55 views

Getting shared distance of two parallel lines using ArcObjects?

I have 2 lines Line A, and Line B that share from point. The 2 lines at first share the same path and are parallel, then they split into different paths. I would like to calculate that segment in ...
1
vote
1answer
2k views

Fixing invalid geometry (self intersection)

Attempted to extract raster by mask layer in QGIS 2.18.15 and for one of my shapefiles, the command could not be executed. The error message reads "Warning 1: Ring Self-intersection at or near point ...
2
votes
1answer
481 views

Remove vertex from geometry (polygon) 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 ...
0
votes
0answers
153 views

Getting well known text from varchar in redshift.

As you know, redshift does not support geometry types. There is a column in a dataset on my redshift db that has varchar column and the format looks like: ...
12
votes
1answer
564 views

Alter Minimum Bounding Box Algorithm

I'm trying to create an algorithm similar to minimum bounding box (though it may end up looking nothing like it). In this case the angle will be passed as a parameter and given the angle I need the ...
1
vote
1answer
38 views

Widget codes works intermittently

I have a QGIS program that is hosted on a SharePoint server that is used by multiple users. I have entered a rule for a point layer that when new features are created default values are added under ...
1
vote
1answer
232 views

Converting multiple geometry KML to Shapefile

I have a KML file with multiple geometry, points and polygons. I want to convert it to a point Shapefile and a polygon Shapefile. Using OSGeo4W Shell I tried this : ogr2ogr -where "OGR_GEOMETRY='...
2
votes
2answers
610 views

How to run Intersect in QGIS when invalid geometry?

I have two layers to make an intersection. I use QGIS 2.18.22 and Vector - Geoprocessing Tools - Intersect - run is not working, because "Input layer A contains invalid geometries. Unable to complete ...
0
votes
1answer
123 views

Create vector layers in sql in spatialite db with PyQGIS / QtSql

I have a vector layer in a spatialite DB structured as follows: In PyQGIS I try to create a derived vector layer from this like from PyQt4.QtSql import * db = QSqlDatabase.addDatabase('QSPATIALITE') ...
3
votes
2answers
2k views

Invalid geometries in QGIS 3 seems to be more prevalent than QGIS 2

I have a large polygon vector data set containing approximately 10,000 rows of data. I have used this data to run specific tasks in the QGIS 2 series (many of the Geoprocessing tools) with no issue of ...
1
vote
0answers
16 views

Points on the opposing side of a breakline

If you have a breakline or even a single line segment within a DEM, how can you tell if two points lie on the opposing side of that breakline or line segment? From a computational geometry standpoint ...
1
vote
0answers
33 views

PostGIS: Get portion of length in polygon. Aggregate value by this portion

I have a table that has two points (made into a line) and a value per row. I have another table that is a grid that has a geometry and id per row. I'd like to aggregate the data in such a way that ...
0
votes
1answer
222 views

Error: Intersect 2 polygons in Python. Record's geometry not match: 'GeometryCollection' != 'Polygon'

I'd tried replicating intersecting two shapefiles from Python or command line by anna-magdalena which requires intersecting two shapes. I used @gene answer for that: import os from shapely.geometry ...
1
vote
0answers
359 views

draw centerline of road polygon in python

I'm trying to draw a center-line of this road element but I'm not able to make it with the PostGIS function ST_ApproximateMedialAxis() Also tried the python centerline library but it giving me error ...
1
vote
1answer
141 views

How to collect polygon features as one polygon in PyQGIS?

I want to collect polygon features from my layer to create one polygon features by considering the field attributes. I mean in attribute table if "DN" value of feature is 1000 that feature will be ...
1
vote
0answers
45 views

Seeking automated approach for categorising roads according to their designs using QGIS?

I have a shapefile comprised of polylines. The road segments are represented by lines that are between nodes. I want to categorise each road segment accordingly as they appear either as a straight ...
2
votes
1answer
115 views

Creating geom object from list of lat, long coordinates

I have this geometry key that looks like this from which I want to create a Geom object so something like this MultiPolygon(((-xx.73833882299999 yy.41161324700006, -xx.73826573899998 yy.41172750400005....
1
vote
1answer
122 views

Loss of geometry in shapefile after saving edits

I'm using QGIS 2.18.17 When I'm editing (e.g. removing objects) from a shapefile in QGIS and click to save the edits, all geometries are lost. All non-deleted objects are still present, but they do ...
0
votes
1answer
65 views

Finding Closest Point to Polyline Vertex and Apply Elevation

I am trying to code a tool that will evaluate all vertices along a polyline and then find the closest point from a survey shapefile and apply that elevation to that vertex, I am wanting to iterate ...
1
vote
0answers
418 views

How to create multipoygon in Openlayers 4? [closed]

I want to create a separate layer in Openlayers 4 with multipolygon geometry. I thought, it's enough to know a few coordinates, put it in an array and create the geometry. After reading documentations,...
0
votes
1answer
292 views

Geometry column isn't visible in the attribute table in QGIS while it is in Python?

This code turns a dissolved shapefile to singlepart but the geometry column although it can be shown in Python when I exported as a shp and imported in QGIS the geometry column is not there. What ...
2
votes
2answers
185 views

How to create “roof line” for a general polygon area?

I have a polygon with an arbitrary shape ( assume that it is well-formed with no self intersection, no duplicated points etc), and I need to subdivide the polygon into sub-polygons like how one would ...
1
vote
0answers
86 views

Transform GML to Geometry (PostGIS) in GeoKettle

How can I transform GML (saved in XML file) to Geometry type? I've noticed function 'Geometry from GML' in Calculator but it needs string value with GML. Is there any way to extract it from XML file?...
5
votes
1answer
719 views

QGIS update feature geometry from attribute fields

I know how to get the geometry (x,y) into attribute fields with the calculator, but I can't figure out how to update the geometry from values contained in attributes. I am trying Field Calculator > ...
2
votes
1answer
554 views

Using Polygon centroids tool - points aren't always inside polygon, can I fix that?

When I use Polygon centroid tool, points aren't always inside polygon, because some polygons have weird shape with holes inside them. I have big amount of polygons and I need to use this tool and I ...
0
votes
1answer
154 views

Has anyone used Esri JSON data with json-schema validation?

Passing data between web services often means passing JSON data. A standard for evaluating JSON data is under development at json-schema.org. I would like to incorporate Esri JSON data in my schema ...
1
vote
1answer
104 views

What's the math behind moving from a starting point in the direction of another one?

I am working with decimal-degree coordinates for a software and lack geographic background. I want to convert the coordinates to a grid to calculate distances and then move around using standard ...
5
votes
1answer
98 views

PostGIS same query and same geom produce different output when writing hex or text formatted geom

the same geom(etry) once in hex code and the other one in text formatted produce in text formatted a linestring (which is correct!) and once a multilinestring when using the raw hex geom (which is ...
1
vote
1answer
252 views

QGIS crashes after script is run for the second time

QGIS Version - 3.0.1 I am trying to create a shapefile with geometry set to 'Point' and SHPT set to 'Point'. But before that I am facing following problems. 1) When I run the below script through ...
3
votes
4answers
306 views

Plain geometry editor for QGIS 3.0?

In QGIS 2.18, I had been using the plugin "Plain Geometry Editor" to view, copy and paste the WKT geometry of features (as a solution to this question). However, this plugin is not available for QGIS ...
1
vote
2answers
113 views

How to check whether a feature has been split in GeoTools?

In my program I am looking for a best place for a golf course. Three of the conditions are: The course must be on a hill, it must be at least 100 meters away from roads and must not be larger than ...
3
votes
2answers
2k views

QGIS change geometry type in shapefile

I have 7 shapefiles which I would like to combine using the 'Merge shapefiles' function in QGIS. I got the error message that the shapefiles must all be the same geometry. I checked this, one ...
1
vote
1answer
64 views

While saving shapefile to disk, is there a way to set the geometry type and SHPT

QGIS 3.0.1 I wrote a code to create a vector layer and save it to disk as shapefile . Is there a way I can save its geometry property as 'Point' and SHPT as 'Point' from qgis.core import * import ...
0
votes
1answer
99 views

Not able to parse Latitude & longitude to ogr_geometry

I have a table (Table1) of locations with Latitude and Longitude values. Loc_Nm || geocode_latitude || geocode_longitude A || 43.43044 || -80.0910793 W || 43.9114523 || ...
3
votes
2answers
3k views

Identify polygon containing point with R sf package

I would like to be able to map geocoded coordinates to a region on a .shp file in R using the sf package. I can load up the map and plot it but I am struggling with the code to return the region for ...
0
votes
1answer
89 views

Splitting One Polygon By Boundary of Another using QGIS?

I'm using QGIS 3.0 and attempting to calculate the number of people that fall within a buffer. The population count is a field within my block group polygon layer. I've attached a screenshot, the ...
3
votes
1answer
176 views

QGIS point sample tool faster than in PostGIS - how to improve query?

My points table has 246,338 features and the polygon table has 43,957 features. I am relating the values of one attribute from the polygons to update a column in the points table. This question is ...
-2
votes
1answer
90 views

Line 178 Processing Error Invalid Geometry [closed]

I am using QGIS 3.0 and attempting to intersect 2 block group layers with a common code value of '1'. I keep getting the following error for 2 of the 3 counties in my area of interest. I've tried ...
1
vote
1answer
118 views

Line intersection with multiple polygons from a shapefile in PostGIS/PostgreSQL database

I am trying find where a line (chosen by a user) intersects any of the multiple polygons within the shapefile. The shapefile is in EPSG:4326 and the coordinates are in (longitude, latitude). I have ...
0
votes
0answers
234 views

Self-Contact Topology Errors?

I've been trying to clean up some vector data sets so that I can reproject them to WGS84 but I keep finding topological errors that fail the process. The one error I can't resolve involves a node on a ...
0
votes
1answer
295 views

Listing All Points In a Polygon Feature Class Using arcPy [closed]

Based on my understanding in coding, I thought the following code will list all points in every feature in my Building polygon feature class: arcpy.env.workspace=r'D:\test.gdb' rows=arcpy.da....
1
vote
1answer
1k views

Create a collection of geometries in JTS

I'd like to create a program that a user inputs coordinates as points or lines and gets a geojson file. The problem is I don't know how to store all the geometries in one file. For example I want to ...
3
votes
0answers
288 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 ...
3
votes
1answer
66 views

Assigning existing geometry to another layer in QGIS?

I have several line layers that run parallel to each other and would like to assign the geometry of the central line to all the others without losing information in the attribute tables. Is there a ...
0
votes
1answer
162 views

Creating new PostGIS table with records + geometries from another table?

I have a bunch of PostGIS tables (one per county) containing polygons for all of the property parcels in that county. Each layer also includes several attributes like street address, property value, ...
1
vote
2answers
152 views

ArcGIS messing with feature geometry in Editing mode

I am currently working on project, where I need to digitise a geomorphological map. I am working in ArcMap 10.5.1. I have an issue with creating new features. When I am digitising an object from the ...
3
votes
1answer
279 views

How to load the full content of a vector layer using PyQGIS?

I am trying to load a geojson file using the following code: capa = QgsVectorLayer("C:/...file.geojson","capa","ogr") if not layer.isValid(): print("Layer failed to load!") QgsProject.instance()....
3
votes
1answer
216 views

How to delete from mutipolygons all but the biggest polygon in QGIS

I have a bit too complex multipolygon set to be used in a web application (thematic map) so I'd like to simplify the structure by removing small islands of areas. I am not an expert on QGIS but so far ...