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

learn more… | top users | synonyms

58
votes
15answers
19k 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 ...
32
votes
4answers
6k views

What are the pros and cons of PostGIS 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 ...
28
votes
1answer
7k 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 ...
27
votes
4answers
6k 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) ...
24
votes
3answers
6k 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 ...
21
votes
1answer
679 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 ...
19
votes
3answers
5k 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 ...
18
votes
4answers
2k 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 ...
17
votes
3answers
3k 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 ...
16
votes
2answers
4k 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: ...
14
votes
3answers
2k views

How to find the maximum-area-rectangle inside a convex polygon?

In this post we are looking for algorithms / ideas on how to find the maximum-area-rectangle inside a convex polygon. In the following figure, numbers are the areas of the fitted rectangles. As shown ...
13
votes
5answers
407 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
520 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
1k 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
2answers
3k 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 ...
12
votes
5answers
751 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
4answers
2k 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 ...
11
votes
4answers
392 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 ...
11
votes
2answers
1k 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 ...
11
votes
3answers
2k views

Self intersections for polygons, how to solve?

I have a question about repairing a self intersecting polygon shapefile. I have a shapefile containing Polygons (ZM) which have self intersecting features. If I use the "repair geometry" tool, it ...
10
votes
3answers
13k 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 ...
10
votes
2answers
5k 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: ...
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 ...
10
votes
2answers
371 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 ...
9
votes
4answers
12k views

How to get coordinates from geometry in PostGIS?

This line: SELECT geom FROM myLayer.geom will return a hex value, i'm wondering how would it be possible to get decimal values, a result that look likes human-readable coordination? Regards,
9
votes
5answers
1k 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
2answers
1k 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 ...
9
votes
2answers
4k 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 ...
9
votes
4answers
263 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
365 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
6k 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 ...
9
votes
1answer
406 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 ...
8
votes
6answers
1k 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
1answer
239 views

What is the precision of SELECT DISTINCT on PostGIS geometry column?

I wonder what the precision of the SELECT DISTINCT operator is on a PostGIS geometry. On my system, the following query gives me a count of 5, which means that the inserted points are considered equal ...
8
votes
1answer
287 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
1k 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 ...
7
votes
3answers
2k 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 ...
7
votes
2answers
762 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
2k 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 ...
7
votes
1answer
207 views

Draw middle ordinate perpendicular to chord, out to curve, with arcpy

I've been assigned to find the radius of road curves. My boss found this article describing a pretty straightforward method of doing so: find the start/end points of the curve; create a chord; ...
6
votes
3answers
10k views

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

Hy guys, 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 ...
6
votes
1answer
356 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
773 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
1answer
2k views

Postgis - Converting 'geometry_dump' data type to a 'geometry' type

I am working with a dataset of property boundaries that has had ST_Union() run on it, thus all the polygons appear as a multi polygon in one row of a table. I would like to separate these out so I get ...
6
votes
1answer
581 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 ...
6
votes
2answers
1k 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 ...
6
votes
3answers
1k views

How to fill a hole in a multi-polygon layer on QGIS 2?

I need to fill a hole in a multi-polygon layer on QGIS 2.0. I've set the snapping option for the layer as follows : mode: to vertex and segment tolerance 4 pixels avoid intersection "enabled" ...
6
votes
1answer
2k views

Geometry from multiple selected features into one geometry

Lets see if I can explain what I'm trying to do. First of all I have developed an AddIn for ArcMap that can take one selected feature (Polygon) on a layer, grab the geometry of that feature, and save ...
6
votes
3answers
499 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
273 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 ...