Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a script that will square the corners of polygons that are near 90 degrees but not exactly. Near could be dealt with via a variable, for example within 5 degrees of 90 (85 - 95 degrees).

For a more detailed description and some rather formal pseudo code, please refer to the following ESRI thread (particularly William Huber's post) :

http://forums.esri.com/Thread.asp?c=93&f=987&t=106494

share|improve this question
    
Note that the ESRI forums post includes a working spreadsheet, so there is code in addition to pseudocode. The crux of the matter is solving an optimization problem. ArcGIS doesn't have tools for this, but its add-ins (such as R and Python) do. It would be a fun little script to write for those with the skills...(which wouldn't include me: I'm not an ArcGIS programmer). – whuber Jun 8 '11 at 20:20
    
The following thread on measuring the angles of the corners of a polygon is a step in the right direction - gis.stackexchange.com/questions/10535/… – Brent Edwards Jun 9 '11 at 12:46
    
This looks promising! github.com/smathermather/pg-orthogonalize – Brent Edwards Dec 1 '15 at 19:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.