Giter Site home page Giter Site logo

Comments (5)

mattijn avatar mattijn commented on July 3, 2024

Thanks for raising the issue! Yes, this will require some work. Also will have to check if the suggested changes are backwards compatible with shapely versions prior 1.8.0

from topojson.

bakaleks avatar bakaleks commented on July 3, 2024

Maybe you can put upper limits on dependency versions? https://github.com/mattijn/topojson/blob/master/pyproject.toml#L17

from topojson.

mattijn avatar mattijn commented on July 3, 2024

Logging to self:

from shapely import geometry
feat = {
    "type": "Feature",
    "geometry": {"type": "LineString", "coordinates": [[0.1, 0.2], [0.3, 0.4]]},
}

geometry.shape(feat)
/Users/mattijnvanhoek/miniconda3/lib/python3.9/site-packages/shapely/geometry/geo.py:123: ShapelyDeprecationWarning: GeometryTypeError will derive from ShapelyError and not TypeError or ValueError in Shapely 2.0.
  raise GeometryTypeError("Unknown geometry type: %s" % geom_type)
---------------------------------------------------------------------------
GeometryTypeError                         Traceback (most recent call last)
/var/folders/2c/mjc91yxs03s45rz21c8crzv40000gn/T/ipykernel_12563/2908707415.py in <module>
      5 }
      6 
----> 7 geometry.shape(feat)

~/miniconda3/lib/python3.9/site-packages/shapely/geometry/geo.py in shape(context)
    121         return GeometryCollection(geoms)
    122     else:
--> 123         raise GeometryTypeError("Unknown geometry type: %s" % geom_type)
    124 
    125 

GeometryTypeError: Unknown geometry type: feature

I include a from shapely.errors import ShapelyError and catch this error as well now (5e7bc72), but I do not think this will make the warning disappear until shapely 2.0

from topojson.

mattijn avatar mattijn commented on July 3, 2024

I still have more warning stating the following:

  <__array_function__ internals>:5: ShapelyDeprecationWarning: The array interface is deprecated and will no longer work in Shapely 2.0. Convert the '.coords' to a numpy array instead.

Where is this <__array_function__ internals>:5 located πŸ€”?? Not sure how to approach this one.

from topojson.

mattijn avatar mattijn commented on July 3, 2024

With PR #158 all code creating deprecation warnings are changed. Current master holds no warnings anymore for the test suite. Thanks for posting this issue, but I'm closing it😊.

from topojson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.