15

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.

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.

  • Great suggestion. I think this is pure Python and so should be GAE compatible (haven't tested yet). Thanks! – atogle Apr 1 '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.

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

  • 1
    It looks like it is for Jython so would require the Java runtime (JRE). – geographika Mar 12 '11 at 15:43
  • I think that all of the GeoScript libs are based off of JTS in some way. – atogle Mar 12 '11 at 17:55
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.

  • "I plan to clone it and optimize it for geospatial use one day." That would be awesome to see! – Karim Bahgat Feb 18 '14 at 17:59
0

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

  • 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
0

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

  • still has a C dependency – WolfOdrade Mar 12 '11 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.