omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    2
    4
    767
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JamesC
      JamesC last edited by

      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

      1 Reply Last reply Reply Quote 0
      • JamesC
        JamesC last edited by

        It’s not pure python?

        James

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • JamesC
            JamesC last edited by

            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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors