Tagged Questions

139 views

Looking for a simple hatching algorithm

If I have an arbitrary polygon, and wish to hatch it with lines at a given angle and spacing, is there a simple low-level algorithm which will return the set of hatch lines inside the polygon?
132 views

Algorithm to move polygon nodes when simplifying

I want to simplify polygons that come from a raster analysis. In order to avoid overlap and gaps, I first convert my polygons to lines. The problem is that all algorithm are then keeping the two end ...
134 views

Looking for dissolve algorithm for Javascript

I have three adjacent polygons that together make up a larger shape. I need an algorithm that will dissolve the internal borders leaving only the outside border. An example would be a group of ...
47 views

how to assign unique attribute value per neighborhood? [duplicate]

I have a feature class of adjacent polygons and I want to assign an integer attribute value to my polygons based on the following rules : a polygon must not have the same attribute value than any of ...
318 views

Lossless Polygon Simplification?

Is there a standard/recommended algorithm for simplifying a polygon without shrinking any of its original boundaries? Right now I'm using TopologyPreservingSimplifer within JTS and running into ...
111 views

Find and destroy duplicate OSM multipolygon/polygons in TileMill/PostGIS

In OpenStreetMap there are sometimes multipolygons where attributes are present on both the polygon and the multipolygon relation, such as the Grampians National Park: ...
477 views

Detecting invalid polygons (self-intersecting or touching)

An invalid polygon can be defined as one that intersects itself, or one where the lines make contact, ie, the two shapes at the top of this picture. Given the XYPoints of a polygon, what logic ...
262 views

Creating an “average” polygon

I found this thread in the old ESRI forums with the same type of problem I am facing today. The solution to the problem is explained in little detail and since I am not an expert, I was wondering if ...
174 views

Divide polygon evenly based on lines and intersection points

I have this purple polygon illustrated in the figure below. I would like to split the polygon so that each line segment (green) split the polygon evenly with the surrounding line segments. A line ...
607 views

How to convert self intersecting polygon to multipolygon?

Working with the union and polygonize methods in GDAL/OGR, I often end up with self intersecting polygons. The case is one polygon which essentially consists of two polygons: In the above example, ...
405 views

inner convex-hulls in a set of 2D points

A set of 2D Points are scattered randomly (i.e., no specified pattern), we are interested in finding all inner-convex-hulls (ICH) in an order of largest in area to a minimum until the entire study ...
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 ...
602 views

Algorithm for splitting polygons/polylines into multiple sections at 180° E/W

I have code (in C++) that draws various polygons on a map that uses a cylindrical projection (typically Mercator, sometimes Miller Equidistant if you want to be precise). For simple polygons, curves ...
396 views

Find Duplicate Polygons Algorithm

I have a group of polygons. My objective is to find the duplicate polygons from these group of polygons. Using NetTopologySuite(A c# port of JTS), it is possible to compare two geometires and check ...
563 views

Split polygon with holes to get several hole-less polygons

Unlike this thread I actually need to split the polygons into several hole-less polygons. I'm not sure on how to approach to this problem. I have polygons with holes of many diferent shapes, like ...
256 views

How to get all intersections between two simple polygons in O(n+k)? [closed]

Can someone help with a following problem: report all intersections between two simple polygons in O(n+k) where n - is a total number of polygon edges and k - is number of intersections. As a result - ...
214 views

algorithm for displaying holes in a polygon by translating it into several hole-less polygons?

I'd like to plot polygons with holes on a framework that doesn't support holes. The approach to me seems to be to translate the single polygon into several ones adding up to the whole polygon, leaving ...
2k views

How to get the radius of a “circle” in Openlayers

How do you get the radius of a circle in openlayers? I have searched quite a bit and cannot find any resource for this. please help. Here is my code but I want the radius or circumference of the ...
2k views

Algorithm to fix topological errors in GIS software apps

Related question here. I notice that ensuring topological correctness is essential for GIS applications, this is because the input from user or polygon boolean operation can have severe topological ...
1k views

Why doesn't the split tool return any records in the attribute table?

I've been trying to split a large land use shapefile using a set of study area polygons as the split feature, but when the function finally finishes running (the land use dataset is quite large), all ...
981 views

How to create a polygon from other polygon boundaries?

I want to write an algorithm that creates a polygon inside a hole made by a set of other polygons. It's something like a flood fill and it's like the "boundary" tool in Autocad. The image shows an ...
162 views

How to bring polygons closer to a point?

I have some scattered polygons with a lot of space between them. I want to make a thematic map but all that white space doesn't look very good, so I want to bring the polygons closer to the center of ...
2k views

Algorithm to find polygons enclosing points

I'm trying to find an algorithm that can determine the smallest possible polygons to cover a number of points. I know how to get the convex hull around all the points, but say that the points are ...
942 views

PostGIS: split a polygon in a given ratio

Is there a convenient way to split a polygon into n parts, more-or-less equal in size in PostGIS?
679 views

How to split polygons without ArcView? [closed]

I'm trying to split polygons into equal areas. While fishnet sort of works; the areas I'm trying to split don't touch; they're national parks. Fishnet spans the whole area, not just the polygons in ...