UNIT 33 - SIMPLE ALGORITHMS II - POLYGONS

UNIT 33 - SIMPLE ALGORITHMS II - POLYGONS

  • A. INTRODUCTION
  • B. POLYGON AREA
  • C. POINT IN POLYGON ALGORITHM
  • D. CENTROID LOCATION
  • E. SKELETON
  • REFERENCES
  • DISCUSSION AND EXAM QUESTIONS
  • NOTES

    UNIT 33 - SIMPLE ALGORITHMS II - POLYGONS

    A. INTRODUCTION

    B. POLYGON AREA

    Objective

    Method

    Problems

    Calculating areas of many polygons at once

    C. POINT IN POLYGON ALGORITHM

    Objective

    Generalization

    Strategy

    Sample code

    Special cases

    Fuzzy boundaries

    Many points in many polygons

    D. CENTROID LOCATION

    Method

    E. SKELETON

    Applications

    REFERENCES

    Blakemore, M., 1984, "Generalization and error in spatial databases," Cartographica 21:131-9.

    Shamos, M.I., and F.P. Preparata, 1985. Computational Geometry, Springer-Verlag, Berlin. The standard but technically complex work on geometric algorithms.

    DISCUSSION AND EXAM QUESTIONS

    1. Discuss the results of using the polygon area and point in polygon algorithms when the polygon is not correctly structured (e.g. unclosed, figure-of-eight).

    2. Modify the point in polygon algorithm to determine correctly if the point lies on the boundary of the polygon, in addition to inside or outside.

    3. Derive the equations for polygon area and centroid from first principles.

    4. Modify the polygon area algorithm to test for and accommodate negative y coordinates.


    Back to Geography 370 Home Page

    Back to Geography 470 Home Page

    Back to GIS & Cartography Course Information Home Page



    Please send comments regarding content to: Brian Klinkenberg
    Please send comments regarding web-site problems to: The Techmaster
    Last Updated: August 30, 1997.