16

Does anyone know of a pure Python (no C or Java dependencies) library for doing geometry operations such as buffer, union, intersects, etc? I'm looking for something that is Google AppEngine compatible.

nmtoken
  • 13,355
  • 5
  • 38
  • 87
atogle
  • 1,742
  • 3
  • 15
  • 22

6 Answers6

12

I don't know about GAE compatibility, but you migh try SymPy for pure math & geometry functions. Otherwise, the only other one I know about is Shapely but it has a libgeos_c dependency which might disqualify it based on your requirements.

UPDATE: Also SymPy is BSD licensed, which might be an important benefit to some devs.

WolfOdrade
  • 2,748
  • 21
  • 24
  • Great suggestion. I think this is pure Python and so should be GAE compatible (haven't tested yet). Thanks! – atogle Apr 01 '11 at 17:17
2

Planar has very limited support for topology operations (only convex hull and point-in-polygon) but it is pure Python and for some cases it could be useful.

steko
  • 719
  • 5
  • 25
1

Py2D is pure python with no external dependencies: https://github.com/sseemayer/Py2D

I believe it has most if not all of the functionality of Shapely/GEOS. But there's a catch. It's designed to be a gaming library so some functions break when you deal with negative coordinates. If you can work around that it's great.

Most of the action is contained in the modules found in the source code directory "Math". I plan to clone it and optimize it for geospatial use one day.

1

I don't know whether the PY implementation of Geoscript relies on external modules or not! Have a look : http://geoscript.org/py/index.html

simo
  • 8,580
  • 1
  • 28
  • 56
-1

Python GIS: http://gispython.org/ There is a collection of many tools.

Pablo
  • 9,827
  • 6
  • 43
  • 73
-2

I would recommend using OSGEO's ogr python library. Not sure about GAE as well.

Glorfindel
  • 1,096
  • 2
  • 9
  • 14
user39901230
  • 466
  • 5
  • 14
  • I've used OGR a good bit for scripting but I think that all of the OGR Python libraries are C wrappers. GAE only allows pure Python 3rd party libraries. – atogle Mar 12 '11 at 17:57