Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Shapely on Pythonista
-
Hi all,
Is it possible to get Shapely to work?
I installed and got around the types error - but no further.
Presume it’s because
-
It’s not pure python?
James
-
While shapely may be pure python (using ctypes), it depends on GEOS being installed, which is C++. So, unless GEOS was packaged with pythonista (it is not), you cannot use shapely.
Options for this sort of thing include coding in pythonista but running in the cloud -- for instance see the thread about sage cell / sage math. Depending on what you want to achieve, you could run the whole script in the cloud, or create a wrapper to shapely API that sends out shapely commands to a cloud server to do the work, but returns back objects containing results, so it is most likely local. That would involve reimplementing the basic API and wrapper objects so that pythonista autocompletes and otherwise looks identical, but sends out cloud requests. Since shapely is already based on ctypes, so is sort of sending out ctypes requests, it might not be too hard to replace the ctypes calls with cloud calls.... But I guess that is sort of relative.
-
Hi Jon,
Thanks for your detailed reply — sounds like it's a little complex for what I want to do.
Am using the library with some drawing code and was hoping I could use my iPad as a mobile coding station — but... guess not now.
Thanks anyway!
James