0
votes
0answers
6 views

Polygon parcel division in python

Is there an open source tool or module in python that does parcel division of polygons like in ArcEditor?
0
votes
0answers
31 views

how to remove a point or polygon in shapely python

I want to place minimum number of sensors(circles) to cover a maximum area(polygon). I am using "Shapely",python module. I want to know if a sensor i.e a point buffer inside the range of the other ...
0
votes
1answer
73 views

Automating Intersect between two polygon layers

I have a spreadsheet that has county-level occurrences of around 1000 species within the US in the column headings (Species State County). Thus, for some counties there may be multiple species. I ...
2
votes
1answer
123 views

How to surround a Polygon object with a corridor of specified width?

I'd like to build a corridor surrounding a polygon, so that the corridor's outer bounds all have the same distance to the inner bounds. Like this: I've made this lousy graphic in Paint, since I ...
0
votes
0answers
43 views

Draw polygon shape via Qbutton

Ideally; a Ui Qbutton is needed that will activate map canvas editing to add a polygon via the classic mouse click rubber band method. Upon a concluding right click with the active tool, editing ...
0
votes
1answer
64 views

Get the outer ring inner ring for a given polygon using ogr python binding

I am trying to read the geometry of some shapefiles, now I meet some problem when I try to identify the polygon with holes, since a polygon may(or not) have one hole(or multiple holes). This is the ...
3
votes
2answers
102 views

Can I convert the sharp edges of a polygon easily to round edges?

I use the python module "shapely" to make Polygons (like below). Can I convert the sharp edges of a polygon easily to round edges? Such that when I have unified some polygons I could issue a command ...
1
vote
2answers
134 views

How can I group Points to make polygon via Python

I have an array of coordinates Point= [lat,long] ListPoint= [[38.203655,-76.113281],[38.10,-76.12],..] I wanna make a polygon that contains all these points ? There is a project developed by ...
1
vote
0answers
69 views

How do I smooth edges of polygons in QGIS?

Is there a built in function or plugin I can use to achieve smooth lines for my polygons instead of the blocky ones I have now?
0
votes
1answer
101 views

How to obtain the maximum/minimum longitude and latitude for a polygon?

I have the MSA/CMSA shape file which contains 274 metropolitan areas. How do I have to obtain the maximum/minimum longitude and latitude for an area? So, it's like drawing a box right outside and ...
1
vote
1answer
49 views

How to automatically add identical new polygons to a layer?

I am seeking a way, using QGIS, to automatically add polygon features identical to others on the layer. In this case, they are water valves on a water network. Anyone know of a user-friendly way to ...
1
vote
1answer
84 views

Polygons not appearing when creating shapefile based on criteria using GDAL and Python (area calculated properly)

I am looping over the features of a shapefile containing multiple polygons. If certain criteria are met, I want to save the current feature in a new shapefile. I am doing this using GDAL 1.10.0 with ...
0
votes
0answers
89 views

Calculating distances between boundaries of polygons with Python

I have two sets of shape-files which have to be worked on within a Python Script. Those two Shape Files might differ from each other (same thematic content, but 2 different epochs). If there occurred ...
2
votes
2answers
1k views

Determine if point is within an irregular polygon using Python

I would like to create a mask of a grid where points are evaluated as either 1's or 0's depending on if they lay outside of an irregular (i.e. not rectangular) polygon. I have a set of high-latitude ...
2
votes
1answer
122 views

Does spherical equilateral triangle T contain point P?

I am working on a Python script to: compute the vertex coordinates of a geodesic sphere/icosahedron, project the triangles onto a sphere, then find which spherical triangle contains an arbitrary ...
1
vote
0answers
182 views

Locating the centroid (center of mass) of spherical polygons

I'm trying to work out how best to locate the centroid of an arbitrary shape draped over a unit sphere, with the input being ordered (clockwise or anti-cw) vertices for the shape boundary. The density ...
4
votes
1answer
218 views

Create MultiPolygon from QgsGeometry.fromMultiPolygon

I have a list of polygons' points like [[x1,y1],[x2,y2],[x3,y3],[x4,y4]] [[x5,y5],[x6,y6],[x7,y7].[x8,y8]] now I want to create multipolygon from it by using feature = QgsFeature() ...
1
vote
1answer
329 views

Failed to convert polygon to raster

I have two steps here. First select layer by attributes. Second convert polygon to raster. It failed when it goes to second step and kept giving me error 999999: Error executing function. I pasted my ...
1
vote
0answers
87 views

how to avoid Intersection of polygons via python code

i am using QGIS 1.8 and i can set the check box in Setting\Snapping Options "Snapping and Digitizing " dialog to avoid polygon intersections and enable topological editing but i am looking for a way ...
2
votes
1answer
378 views

Distance of points in polygon to nearest polygon edge

I have a polygon shapefile with about a dozen polygons (Area.shp). I have an equation that calculates a value for points (or small areas) as a function of distance to the edge of these polygons. I ...
0
votes
2answers
210 views

Where to find the variables of QgsPolygon and QgsPolyline?

now I want to use QgsPolygon (and Qgspolyline,too) class in python I have a example by using QgsPoint but I don't know how to use in QgsPolygon following is my Qgspoint example feature = ...
2
votes
1answer
279 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 ...
4
votes
4answers
361 views

How to computational efficiently check if there are any overlapping polygons in a group of polygons?

I need to do some processing with groups of polygons. If any of the polygons in the group overlaps other polygon the result is unpredictable and don't throw any error. So, I need to detect if there is ...
7
votes
3answers
853 views

Create a square grid polygon shapefile with python

i have the following coordinates minx,maxx,miny,maxy = 448262.080078, 450360.750122, 6262492.020081, 6262938.950073 i wish to create a square grid of size 1 m using python. import math ...
6
votes
1answer
310 views

Efficiently identifying overlapping polygons with Python

I'm parsing the NOAA severe weather alert feed and using it as a datasource for a weather alerting system. In the feed, I occasionally find a polygon entry for an alert. Unfortunately, counties that ...
4
votes
3answers
913 views

Python OGR: convert a point geometry into polygon

I'm writing a routine for creating the convex hull envelop around shapefiles of islands. I could read the data, extract polygons vertices into a geometry and then compute the convex hull. Now I need ...
3
votes
2answers
457 views

How to filter out multipart polygons and then buffer?

I've written a small script trying to accomplish the task described in the question title. It basically looks like: in_fc = '...' # Some shapefile goes here # Get the fields (column names) of the ...
5
votes
1answer
933 views

Dissolving specific polygons inside SearchCursor with Python in Arcmap

I have a layer with catchment polygons. For those that are smaller than a certain size, I want to merge with an adjoining polygon (namely the one downstream). In the attribute table I have a GridID, ...
4
votes
5answers
669 views

Python loop Polygon to raster not working

I want to convert a large number of different shp polygons to raster in ArcGIS 10.1, using an existing field column "class" for the new raster classes. I am not very fluent in python but I thought ...
1
vote
1answer
150 views

How to construct a line from points in pyshp?

I am reading a shapefile for a pipeline and what I've noticed is that if I just draw a line from one point to the next (in the order I read them), there will be points where the line terminates, and ...
6
votes
1answer
325 views

How to draw shapes with highest possible decimal accuracy

I am trying to read input of lat and long to draw the shape based on condition.The input is standard array of lat and long with 15 decimal accuracy. I am realizing - I am loosing some decimal accuracy ...
5
votes
0answers
164 views

How to rotate polygon to find best fit in Mapnik? [closed]

I have a quite simple problem but somehow I just fail to solve it. There is a polygon and a range xsize and ysize. The x and y size determines the mapnik generated image. The polygon should now be ...
3
votes
1answer
598 views

how do I get the “outer mantle” of a polygon shape file? (without joining all the polygons)

I am interested in finding all the vertices of all polygons which are not on the inside the most outer polygoin that can be formed in a shape file: Here is how I get all the vertices: def ...
2
votes
1answer
147 views

Merge section polygons in PLSS

I am trying to merge quarter quarter sections of polygons from PLSS into a quarter section. However, I also want it assigned to correct Township/Range/Section while merging. I know I can hand merge ...
3
votes
1answer
2k views

How do I rotate the polygon about an anchor point using python script?

I know there would be no tool in arcpy module as such but mignt have in third party modules. I however tried taking the vertices of the polygon and moving using the below formula. but did not get the ...
3
votes
1answer
216 views

Best Method for Validating polygons?

I would like to assess the spatial accuracy of a load of polygon shapefiles which are supposed to show air quality for a bunch of countries. Firstly I want to assess whether each shapefile has a ...
2
votes
2answers
2k views

How to automate point-in-polygon queries in ArcView?

Layer1 = point shapefile (multiple points, geocoded) Layer2 = polygon (1 attribute; (1,2,3...)) I want a non-gis person to be able input a single address and be told the attribute of the polygon ...
3
votes
2answers
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 ...
14
votes
6answers
4k views

Generate points that lie inside polygon

I have polygon feature and want to be able to generate points inside it. I need this for one classification task. Generating random points until one is inside the polygon wouldn't work because it's ...
9
votes
4answers
6k views

using shapely: translating between Polygons and MultiPolygons

[EDIT: the solution to this was simply to use OGR to read shapefiles. See geographika's example.] In an ESRI shapefile, there is no distinction between Polygons and MultiPolygons. Furthermore, there ...