Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Utilities

    geo-utils 0.1

    Download button

    No screenshots available
    Downloads: 204  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ilya Sterin | More programs
    BSD License / FREE
    June 2nd, 2010, 19:46 GMT
    ROOT / Utilities

     Read user reviews (0)  Refer to a friend  Subscribe

    geo-utils description

    Miscellaneous geospatial utilities

    geo-utils contains two helpful utility functions:

     1. Point-in-polygon test
     2. Random point generator. Right now it performs better if the polygon covers a large portion of its bounding box. The test is performed using this algorithm.

     1. Generate a bounding box
     2. Generate a random point within this bounding box
     3. Perform a point-in-polygon test on this point. If the test succeeds, return the point, if not loop to step a and perform again.

     ** If anyone know of a better way to do above, let me know. I'd love to hear some better ideas especially when dealing with complex concave polygons.

    USAGE:

    Point-in-polygon test:

    polygon = Polygon((0,0), (0,4), (4,4), (4,0), (0,0))
    point = geo.Point(2,2)
    assert polygon.contains(geo.Point(2,2))


    Random point within a polygon

    polygon = Polygon( geo.LatLon(42.39321,-82.92114),
     geo.LatLon(42.39194,-82.91669),
     geo.LatLon(42.39147,-82.91796),
     geo.LatLon(42.39090,-82.91974),
     geo.LatLon(42.39321,-82.92114))

    point = polygon.random_point()
    assert polygon.contains(point)


    INSTALLATION:

    You can install the package either by cloning this repository and running the standard

    python setup.py install

    or install from pypi

    pip install geo-utils



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    geospatial utilities | geographical utilities | point-in-polygon test | geospatial | geographical | utilities

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM