# Tag Info

30

This problem has many valid solutions. One of them works a little like your description, but instead of slicing the polygons at "random" locations you can do it purposefully in a way designed to minimize the amount of computation. Here is the basic algorithm. Its input consists of any plane sweep direction, a polygon P of nonzero area, a target area a ...

23

That convention goes back to the surveying industry; which has a point of beginning. So you start at a point in space, and the last point you reference is your closing point. This way you have a closed object. So to build a full COGO object you need to have a complete description of what is being described. Its more accurate than a assumed close.

23

A quick and dirty method is to draw the shadows of the building roofs only, render them in dark gray (preferably semi-transparent if there are any underlying ground layers), and draw the building polygons over them. The roof shadows are obtained by translating the building polygons by the distances determined by the building heights in the direction ...

20

We need to bear in mind that these data are samples of discrete lithologic domains. Often, the boundary between two such domains cannot be identified in the field and so it's not valid to expect that many of the sample locations will lie precisely along boundaries. A correct solution will be a partition of the study area and each polygon within that ...

17

You need to iterate at some level. (Update: I've edited to remove all "for" loops, except for one list comprehension) # imports used throughout this example from shapely.geometry import Point from shapely.ops import cascaded_union from itertools import combinations # Here are your input shapes (circles A, B, C) A = Point(3, 6).buffer(4) B = Point(6, 2)....

16

The geometry_dump data type is a simple composite type with two fields: path[] (a 1-d array holding the position of the geometry within the dumped object), and geom, which is what you want. To access geom, just use (ST_Dump(the_geom)).geom (the extra parentheses are required, and is a bit of a gotcha when accessing members from composite types). For example: ...

15

In principle, you cannot do this in a unique, accurate way without reconstructing something like the original DEM. Let's see why, by doing the computation with a (difficult but realistic) example. It begins with a small portion of a 30 meter DEM, about 15 by 11 kilometers. Contours have been computed at regular intervals: this is where you begin. To ...

14

There are many algorithms to solve this problem (Wikipedia "Convex_hull_algorithms"): Gift wrapping aka Jarvis march — O(nh): One of the simplest algorithms. It has O(nh) time complexity, where n is the number of points in the set, and h is the number of points in the hull. In the worst case the complexity is O(n2). Graham scan — O(n log n): Slightly more ...

13

At version 10, there is now a Minimum Bounding Geometry (Data Management) geoprocessing tool which: Creates a feature class containing polygons which represent a specified minimum bounding geometry enclosing each input feature or each group of input features. However: The Geometry Type (geometry_type) options CONVEX_HULL, CIRCLE, and ENVELOPE ...

13

You have to use lyr.SetFeature(i) to trigger the update in your shape file. You'll have to close the data sources in the end so things get written. import sys import ogr ds = ogr.Open( 'tttttttttt.shp', update = 1 ) if ds is None: print "Open failed./n" sys.exit( 1 ) lyr = ds.GetLayerByName( "tttttttttt" ) lyr.ResetReading() field_defn = ogr....

13

Basic license workaround (Advanced license alternative: Erase) below: Union both layers Edit, select (those where FID_circleLayer <> -1 and FID_parcelLayer = -1, using selection type "are within (Clementini) the source layer feature") and delete.

11

The criteria for valid polygons are defined in the OGC's Simple Feature standards document* adhered to by the majority of GIS software and spatial databases. The reasons for requiring the start points and end points to match are likely to relate to the topological concept of a closed set. The rules for a valid polygon are: Polygons are topologically ...

11

Try gdal_polygonize.py. E.g., to create a Shapefile mylayer.shp from input myraster.tif: gdal_polygonize.py myraster.tif -f "ESRI Shapefile" mylayer.shp or to output directly to a PostGIS database (see the PostgreSQL / PostGIS driver details for GDAL): gdal_polygonize.py myraster.tif -f PostgreSQL PG:"dbname='postgis' user='postgres'" mylayer (ignore ...

10

Converting lines to polygons will be easy: (Vector > Geometry Tools > Lines to polygons) To deal with dangling ends, you could create a buffer around the polylines (Vector > Geoprocessing Tools > Buffer) and set them to 'dissolve'. This would attach any dangling endpoints to eachother. Then convert the buffer polygons into lines (Vector > ...

9

There isn't any tool to do this in 1 single step, you should either: convert your text file to points convert points to lines with Points to Line convert lines to polygons with Feature to Polygon (Advanced licnese required) Or: Use arcpy :) - no specific license required. See an example at the bottom of the page Writing geometries. The code converts ...

7

For dealing with the dangle problem I suggest you try the Polygonizer plug-in, see here.

7

I think the Integrate tool from the Data Management toolbox should solve this - you can set a tolerance and it will align and remove any slivers from two polygons. ArcGIS Integrate tool help

7

Assuming you've created the polygons by closing the ends (closing lines are given elevation of -9999 so they're removed and not factored into the min and max) and using Feature to Polygon then added your field (nilai as text): import sys, os, arcpy InPolygons = sys.argv[1] NearContour = sys.argv[2] OutPolygons = sys.argv[3] ElevationFieldName = "Elevation"...

6

It also makes many algorithms easier if you don't have to worry about wrapping round to the beginning of the polygon again.

6

1)Convex Hull in GRASS GIS: http://grass.fbk.eu/grass64/manuals/html64_user/v.hull.html 2)Convex Hull in Qgis Vector Tools (very easy to use):

6

6

This looks like it must be a O(n^2) algorithm for n points (although I have been unable to prove this). That means it will scale poorly and you're doomed to long computation times with more than a few thousand points. But some observations will help: Each "direction" is really two directions, that of a ray and another ray in the opposite direction. It ...

5

I've used Hawth's Tools "Create Minimum Convex Polygons" under the Animal Movements menu. You can use a feature selection within ArcMap.

5

i think you can do it with some codes. check out here for splitting polygons with Split (Analysis): Splitting the Input Features creates a subset of multiple output feature classes. Syntax Split_analysis (in_features, split_features, split_field, out_workspace, {cluster_tolerance}) Examples: import arcpy arcpy.env.workspace = "c:/data" arcpy....

5

Sounds like spatial bookmarks - maybe that's also an option. But given that you have a current polygon layer in the same CRS as the project, you can do this in the python console to add a new feature with the current extent: f = QgsFeature() f.setGeometry( QgsGeometry.fromRect( qgis.utils.iface.mapCanvas().extent() ) ) l = qgis.utils.iface....

5

It's not really any different than creating a Cartesian grid; the only complication involves representing the circular arcs that bound each cell. As in the Cartesian case, the input should include an origin, a set of radii to use, and a set of angles to use. For greater generality, we needn't require that radii or angles be equally spaced. Here's an ...

5

I've created 4 tools which might help you out. 1) The first 2 tools create a quarter section grid from an existing section grid and provide custom labeling for each quarter section. 2) The other 2 tools create a quarter quarter section grid from an existing section grid and provide custom labeling for each quarter quarter section. I say ...

5

One technique you could use to remove noise from a binary raster is to use Expand and then Shrink from the Spatial Analyst toolbox. By expanding by n you will fill any holes of less than n * 2 cells wide (holes are filled from every edge), and then the shrink will return your boundaries to (mostly) original values (you'll lose noise around the edge of the ...

5

First of all, thanks for all answers and comments. Unfortunetaly, the existing tools were not fully compatible with the latest versions of QGIS and ArcGIS. Therefore I made my own solution using the tool indicated by @polygeo, the QGIS plugin from @Alexandre and the name of the algorithm (four color map) from @Jens. Here is my code for those interested (for ...

5

On picture red markers - is vertex of polygon. Try Settings->Options-->Digitizing : change Marker style (Cross) to Semi transparent circle.

Only top voted, non community-wiki answers of a minimum length are eligible