(1) abstract geometry; (2) storing geographic data in projected coordinates; (3) a generic ESRI term for vector features; a class for "geometry" objects.
50
votes
12answers
12k views
Concave Hull: Definition, Algorithms and Practical Solutions
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 ...
22
votes
4answers
2k views
PostGIS: What are the pros and cons of geography and geometry types
My company uses geometry (the_geom) data type for storing geospatial data.
I've recently been acquainted to the concept of geography (the_geog) data type which, as I understand it, stores the SRID ...
21
votes
1answer
2k 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 ...
19
votes
3answers
2k 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) ...
17
votes
3answers
3k views
How to store lines and polygons in JSON documents?
Looking at the increasing NoSQL movement and considering that databases like MongoDB offers a new perspective in flexible data storage for GIS. What is the best way to store lines and polygons in ...
16
votes
4answers
820 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 ...
15
votes
3answers
2k 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
...
15
votes
3answers
2k 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 ...
15
votes
0answers
360 views
Space filling between random 2D lines
Consider a region (2D) filled with lines randomly (following Figure). We are interested in filling the empty spaces between lines including four boundary edges in a way:
0- maximizing the size of ...
14
votes
2answers
2k 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:
...
13
votes
5answers
309 views
What in-depth spatial database systems tutorials exist?
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 ...
13
votes
5answers
495 views
Terminology: Polygon or Area?
When writing about GIS geometry I'm unsure whether to use the term "polygon" or "area".
In particular, does the word "polygon" suggest a specific type of geometry? For example, a colleague suggested ...
12
votes
4answers
502 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 ...
12
votes
5answers
601 views
Simulating the expansion of polygon features
I've got what I'm hoping will be an interesting question. I'm working on an assignment for an intro to GIS course that uses some Gulf oil spill data to introduce common vector-based spatial analysis ...
11
votes
2answers
749 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 ...
11
votes
4answers
309 views
Given a list of surveyor points, what is the algorithm used to simplify the points and retain the terrain characteristics?
Given a terrain and surveyor points sampled from from it or from its contours, is there any algorithm that one can use to simplify the points ( i.e., reduce the surveyor points number) and at the same ...
10
votes
2answers
3k 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 ...
9
votes
5answers
645 views
Measuring straightness of a curve segment (represented as a polyline)
I'm working on an automatic elevation contour labeling algorithm and one of the factors that I want to take into account when deciding the positions of labels is how "straight" a particular segment of ...
9
votes
4answers
232 views
Is there a standardized or “most used” dummy Z value?
Creating and importing both 2D and 3D data, I have many times encountered the situation where I have no Z value for a coordinate set, that the value of a Z coordinate seems out of range (like -99, ...
9
votes
3answers
287 views
Invalid geometry zoo
Many a time and oft I've spent hours struggling with bizarre bugs resulting from invalid geometries. The symptoms vary greatly, including:
Database slowdowns
Incorrect\Null query results
Log files ...
9
votes
1answer
305 views
Performing Overlay of Two Triangulated Irregular Networks (TIN)
I am referring to the paper here, section 2.6.1, on the adding and subtracting of two TINs:
The addition of two TINs can be
determined exactly and stored into a
new TIN, because the addition ...
9
votes
4answers
887 views
comparing two DEMs
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 wanted to compare how the Digital ...
9
votes
1answer
330 views
Self intersections for polygons, howto solve?
I have a question about repairing a self intersecting polygon shapefile. I have a shapefile containing Polygons (ZM) which has self intersecting features. If I use the "repair Geometry" tool, it finds ...
8
votes
6answers
851 views
Real-world example of Affine Transform?
From the Wikipedia article:
In geometry, an affine transformation or affine map or an affinity (from the Latin, affinis, "connected with") between two vector spaces (strictly speaking, two affine ...
8
votes
3answers
6k 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 ...
8
votes
2answers
337 views
Tools for importing historical maps into modern GIS systems
What tools exist to derive geometries for use with modern GIS systems from older scanned maps? I am referring more to libraries that generate actual data rather than present an interface for manually ...
8
votes
2answers
627 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 ...
8
votes
2answers
3k views
Cutting up a shape file into smaller parts
I've downloaded the 350MB coastline shape file from Openstreetmap, but I really would like to work with a small part of them, is there a way to generate a shapefile of a small area.
I'm using MacOSX ...
8
votes
1answer
4k views
How to create a script tool that will create a copy of a feature class and offset it by a given distance? (arcpy)
I want to duplicate a polygon feature class and offset all of the polygons by about 10 feet in both the x and y directions. I asked if there was any way to do this last week, and I was informed that I ...
8
votes
1answer
115 views
How to rank polylines according to their similarity to a ref polyline?
How to rank polylines according to their similarity to a ref polyline?
Update 1: simulations show that simple $\sqrt{\sum{(case-ref)^2}}$ can find better similarity between polylines (as set of ...
8
votes
2answers
623 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 ...
7
votes
2answers
3k views
Using python in ArcGIS, create a line of varying distance from an origin point
What I'm trying to do is create a line feature from a single point, using a set distance and angle. Using ArcGIS and Python (I hope). Here's the scenario:
Say I have a point at these coordinates: ...
7
votes
2answers
296 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 ...
7
votes
2answers
479 views
Nearest point on a line ( Spherical / Mercator projection )
I have a line (Ax,Ay - Bx,By) over a mercator projection (google maps) and a random point (Cx,Cy) nearest to that line, i would to know the closest point (transparent blue on the image) over that line ...
6
votes
1answer
228 views
How to find the smallest-area ellipse circumscribing a convex polygon?
We are currently dealing with the problem of:
How to find an ellipse circumscribing a convex polygon?
Recent googling and lots of reading could not help me so much :(
6
votes
3answers
614 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 ...
6
votes
2answers
565 views
What is the best way to extract the geometry of a road from OSM data?
What is the best way to extract the geometry of a road from OSM data? The goal is to display segments of highway that are closed due to weather. The weather data consists of positions (in KM measured ...
6
votes
3answers
390 views
How could I compare polygons with appropriate circle?
My problem is that I have a polygon shape file with 1034 records which are the Greek municipalities. My goal is to compare the shape of every record with the circle. In other words, I want to observe ...
6
votes
3answers
223 views
What geometric attributes do polygons possess, and how can these be used to filter features?
Given a polygon featureclass containing many polygons of different sizes and shapes, which geometric attributes (area, perimeter, etc) could be used to filter the polygons? It's probably best to ask ...
5
votes
3answers
1k 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 ...
5
votes
5answers
764 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, or ...
5
votes
1answer
262 views
Which projection casts rays from a point on the surface of the globe to a cylinder?
What is the name of a map projection that casts rays from a point on the surface of the globe to a cylinder?
Some people who make sundials put a map of Earth on the sundial.
I want to use the "right" ...
5
votes
2answers
220 views
Does the Chamberlin trimetric projection map (some) great circles to straight lines?
I know that, in general, the Chamberlin trimetric projection maps most great circles on the sphere to some sort of non-straight curve on the flat map.
But what about the 3 special great circles ...
5
votes
2answers
998 views
Unions of polygons (Postgis ST_UNION for Geography type)
I am looking for a function that will return the intersection of 2 or more polygons (geography type).
I am aware of ST_UNION, ST_COLLECT but it works only for geometry type.
Any tip will be really ...
5
votes
1answer
446 views
Help simplifying multipolygons in geodjango
I have a few multipolygons that have several hundred points in them. I'm looking to create less complex "thumbnails" polygons.
Naturally I'm attempting to use the simplify method, which is supposed ...
5
votes
1answer
164 views
Intermediate points on a small circle
I need to interpolate lat/lon points along a small circle, with a given centre and radius. I've successfully used these formulas for great circles. What is the equivalent for small circles?
5
votes
1answer
201 views
Python: find a method to calculate the “inner centroid” (also known as labelPoint in arcmap) of a polygon
i am looking for a method to compute the X,Y coordinate of a inner point (also known as labelPoint in arcmap) of a (irregular) polygon. I am try to find a solution without the use of ArcGIS module
...
5
votes
1answer
118 views
How do you fix Overlapping Lines?
I have a line dataset that contains some lines where the "end points" are actually found in the middle of the line. In the image below, the nodes are shown in green and one of the end points in red. ...
5
votes
1answer
124 views
How can I increase performance on inserting features with polygon geometry?
I have a problem when inserting features with polygon feature class in FGDB. This is my code:
... initialising some fields (does not affect performance)
m_featureBuffer.Shape = ...
5
votes
1answer
792 views
How do I find the intersections of 2 circles on earths surface?
I have the circles' center in lat & long, as well as the radius in meters. How do I find the circles intersections?
Edit: EXAMPLE:
Circle 1: Center on Earth's surface (43.564627,-116.220524) ...
