# Tagged Questions

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

29k 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 (...
26k views

### How to find the minimum-area-rectangle for given points?

The following is another problem that I am working on it these days. As you see in the figure, (BTW, I tried to make it self-presenter) the question is: How to find the minimum-area-rectangle (MAR) ...
9k views

### How to fix quickly a lot of geometry validity errors in QGIS?

I am working on ownership data at a US county level. I have one shapefile per county that contains thousands of tax parcels. I need to dissolve the polygons representing parcels owned by the same ...
15k views

### Visualising WKT geometry string in QGIS

A very simple question: Is there a simple tool in QGIS to graphically visualise geometry formatted as text? Example geometry: "POLYGON((571178 6337246,571178 6402217,598061 6402217,598061 ...
20k views

### How to find the center of geometry of an object?

Well it might be a simple question. Given a set of 2D or 3D points, the question is: How to find the center of geometry of an object? According to the following figure, the center of geometry ...
31k views

### How to convert .shp to .csv including attributes AND geometry?

I have a .shp file with 60k+ entries, all of which are polygons with corresponding attributes (acreage totals, landowner names, tax ID #s, etc.). What I ultimately need is a .csv file with all of ...
3k views

### Comparing two Digital Elevation Models (DEMs) from LAS files?

I have two Lidar las files, one is original let's say with X points. And the other is copy of the first las file but with Y points, where Y is less than X. Now, I want to compare how the Digital ...
396 views

### ArcGis label last vertex Z value

Is it possible to label a feature in ArcMap using geometry values? In this instance I want to label features (polylines) with the Live Z value of the last vertex obtained from the Shape. However ...
31k views

### Create a geography/geometry column from x and y fields - SQL Server 2008

I'm new in SQL Server 2008 and I hope you will understand my question/need. Thus, I have a table which contains 3 fields (Name, Lat and Long) in my data base (spatial). I want to create a geometry/...
4k views

### Generalisation Strategies for Building Outlines

I have a dataset of building footprints vectorised from a raster dataset. The dataset is currently just a vector representation of the raster data. I would like a polygon dataset that only has ...
2k views

### What are the implications of invalid geometries

I've imported some data in a Postgis database and some of the geometries are reported invalid (ST_IsValidReason reports self-intersection or ring self-intersection). The queries I am performing don't ...
9k views

### Converting between Esri Geometry and WKT using ArcObjects?

It seems like there is no means of converting an ArcObjects geometry to the Well-Known Text representation (and vice versa) in ArcGIS ArcObjects API. The only thing I was able to find is conversion to ...
2k views

### Multilateration Code

I am currently writing some code to do multilateration using TDOA and currently struggling and wondering if anyone has any reference code that can be used as a test case with some sample data that I ...
84 views

### Transform to SRID 900913

How i can transform the geometry WKB for example: ...
6k views

### Find tunnel 'center line'?

I have some map files consisting of 'polylines' (each line is just a list of vertices) representing tunnels, and I want to try and find the tunnel 'center line' (shown, roughly, in red below). I've ...
478 views

### What in-depth spatial database systems tutorials exist? [on hold]

Is there a good tutorial that explains in depth the internals of a GIS and a spatial database system such as PostGIS with examples and without any background assumption? I'm specifically looking for ...
3k views

### How can one compare two geometries in arcpy successfully?

I am trying to compare two separate feature classes to identify differences between them (sort of a diff function). My basic workflow: I extract the geometries using a SearchCursor Save the ...
751 views

### Defining spatial operators (Equals, Disjoint, Touches, Within, Overlaps, Crosses, Intersects, Contains, Relate)?

Ok, I have to admit, I don't really delve too deep into the semantics of the spatial operators list below, I'm more of a user, I write software to drive the SQL most of the time and don't really think ...
706 views

### Convert point XY to page units XY using arcpy?

I am using arcpy to export PDFs from my ArcGIS Server application. I want to move a TextElement in my layout view to the centroid of a selected feature. I can get the centroid of the feature, but that'...
1k views

### How is ST_PointOnSurface calculated?

The PostGIS documentation states that ST_PointOnSurface returns "a POINT guaranteed to lie on the surface". It seems like this function could be trivially implemented to give results that satisfy the ...
2k views

### Python, shapely library: is it possible to do an affine operation on shape polygon?

I am trying to create a rotated rectangle in lat/lon coordinates. Basically, I have the coordinates of the center and rotation angle around the center. Is it possible to do using, shapely or gdal, ...
3k views

### How to create a circle in arcpy

Suppose I have a dataset where each record has an x,y and r (the centroid and radius of a circle). How can I create a polygon feature class containing parametric circles? Sorry to those who have a ...
1k views

### How to perform a cascaded combine from python script in QGIS?

I'm working with a large dataset, and I need to be able to combine up to 400,000 polygons. I have been using the QgsGeometry::combine(QgsGeometry* geometry) function and simply looping over all ...
7k views

### How can I find a point inside a polygon in PostGIS?

How can I find a point that is guaranteed to be within a given polygon in PostGIS? I am aware of the ST_Centroid function. However, the centroid is not always within a polygon, see below: ...
3k views

### How to calculate the angle at which two lines intersect in PostGIS?

I want to calculate the angle between two lines where they intersect in PostGIS. The starting point for angle calculations in PostGIS seems to be ST_Azimuth - but that takes points as input. My first ...
3k views

### Calculating a spherical polygon centroid

I'd like a general way to calculate centroids for polygons on a sphere. So far, the best online reference appears to be: Tools for Graphics and Shapes by Jeff Jenness. The method described ...
1k views

### Retrieve polygon smallest MBR

I have a postgis table containing polygons. I want to transform my polygons to 4 points polygons : retrieve the smallest MBR. Here comes an illustration of what I want : My original polygon is ...
5k views

### Point (of a linestring) within Polygon using ogr and Python

I'm currently working on a project in which I need to build a topological network out of the geometry features I find in shapefiles. So far using Ben Reilly's open source project I've managed to ...
8k views

### How to repair topology of a shapefile?

I performed an object-based image analysis using ENVI EX, and each of the classified features were exported as a shapefile. I transferred those shapefiles into ArcMap 10, and tried to intersect them ...
228 views

### Select the most distant vertex from polygon's centroid using ArcPy

I have a poligon and the polygon's centroid. I want to select the most distant vertex from centroid (picture: point A). I used arcpy.FeatureVerticesToPoints_management to create a feature class ...
1k views

### Growing a PostGIS geometry by a percentage

I'm looking for a way to add a buffer around a PostGIS geometry, but the size of the buffer should depend on size of the geometry. That is, I want each geometry to be enlargened by, say, 5%. The idea ...
696 views

### Polyline selection of features with angle turns up to a specified angle

I'm looking for an automated way to select line features that have specified angle between vertexes. That in order to check water mains layer -steel pipes can have only 45 or 90 degrees turns and I ...
646 views

### Find maximum radius of circle that will fit within an irregular polygon?

I have a problem which I think could be handled by using the Zonal Geometry tool in the ArcGIS Spatial Analyst toolbox. However I do not have a license for Spatial Analyst, so I am searching for an ...
2k views

### How to efficiently determine if a collection of coordinates (polygon) is an ellipse?

I'm attempting to determine a geometry type based on a collection of coordinates and have come across a situation where I'd like to differentiate between what is a "polygon" and what is an "ellipse". ...
1k views

### How to find self-intersecting polylines using ArcObjects?

If I have a polyline, how do I figure out whether it is self-intersecting? I tried to use ITopologicalOperator.IsSimple Property, but it always returns true. Are there any ways of doing these kind ...
2k views

### How to add a point to existing attribute record, rather than edit attributes of an existing point?

I'm using ArcGIS 10 to create point data. Normally I would start an edit session, select point as a construction tool, click where I want a point to be, and then go in and edit the attributes. Say I ...
1k views

### How do I find the points of intersection between a small circle and a great circle?

I only actually need to intersect a great circle arc i.e. the shortest path between two points, with a given small circle. I found this tutorial for intersecting two great circle arcs, but ...
292 views

### How to handle coordinates accuracy in ArcGIS

I am creating very basic rectangular polygon using very basic a Python code nCols,nRows=100,100 corners =[[0,0],[0,nRows],[nCols,nRows],[nCols,0],[0,0]] p=arcpy.Polygon(arcpy.Array([arcpy.Point(*...
1k views

### How to split circles in 8 quadrants

I am using ArcGis 9.3 and I need to split a large number of circles in quadrants. The circles corresponde to a 200m buffer of a point layer and, for each point, I need to split the buffer in 8 ...
360 views

### QGIS 2.2 rendering problems

i have a problem with some geometry. When i run the check geometry validity i get an error coming back that the rings are not closed, so recangular forms that i have surveyed are showing up as ...
341 views

### WKT: What is the reasoning behind the concept of a POINT EMPTY?

In data formats like WKT and WKB, we have ways of representing "empty" geometries. That all pretty much makes sense: a "LINESTRING EMPTY" is a LINESTRING type with 0 vertices. Same with a MULTIPOINT, ...
400 views

### Openlayers drawing interaction geometryFunction

Can anyone help me to convert this function so that it is not dependant on the ol3-debug file as I don't know quite what is replaced upon build. The function works but only in debug mode. It is in ...
442 views

### Using Z and M feature geometry to create line graph in ArcPy/Python?

I am a Python (v2.6.5) noob trying to plot a series of 3D polylines into graphs. So far I've come up with: # Import system modules import arcpy, os, sys, string from arcpy import env ...
1k views

### Can variable be set to reference in_memory workspace object in ArcPy?

This is an offshoot question related to a question I posted earlier. I have the following arcpy code that inputs a Python list of polygon geometry objects to the Union_analysis tool, which then ...
8k views

### Correcting gaps and overlapping polygon (parcels) geometry

I have come across a resource that we rely upon almost daily that is in terrible need of repair. It is not our own product and the supplier is generally not interested in fixing the problem. We are ...
4k views

### How to draw polygons from the python console?

I've been visiting and revisiting the page on geometry handling in the PyQGIS Cookbook: https://www.qgis.org/en/docs/pyqgis_developer_cookbook/geometry.html but can't seem to figure out how to get the ...
11k views

### Find closest lat long to an input lat long (SQL Server 2008)

I have a point cloud in my database (SQL Server 2008 spatial). That is about 6 million records. There are 3 columns: id, value, geom. What is the optimal way of getting the 'value' at input lat long?? ...
163 views

### What is the PostGIS 2.x equivalent of the pre-PostGIS 1.5 ~= operator?

Stemming from my other question: When would a PostGIS geometry compare using ~= return true when ST_Equals returns false?, what is the PostGIS 2.x equivalent of the pre-PostGIS 1.5 ~= operator? It ...