Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] cuspatial._lib.soa_readers example out of date with API? #47

Closed
randerzander opened this issue Sep 10, 2019 · 3 comments
Closed
Labels
bug Something isn't working Needs Triage Need team to review and classify

Comments

@randerzander
Copy link
Contributor

I'm trying to follow this example.

import cuspatial._lib.soa_readers as readers
import cuspatial._lib.spatial as gis

fpos, rpos, plyx, plyy = readers.cpp_read_ply_soa(fn)

Result:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-19-8c68f35633c5> in <module>
      3 
      4 
----> 5 fpos, rpos, plyx, plyy = readers.cpp_read_ply_soa(fn)

AttributeError: module 'cuspatial._lib.soa_readers' has no attribute 'cpp_read_ply_soa'
@randerzander randerzander added Needs Triage Need team to review and classify bug Something isn't working labels Sep 10, 2019
@randerzander
Copy link
Contributor Author

randerzander commented Sep 10, 2019

I tried cpp_read_polygon_soa(soa_file_name) instead and get a different error:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-22-a89fda1f9a7e> in <module>
      2 import cuspatial._lib.spatial as gis
      3 
----> 4 fpos, rpos, plyx, plyy = readers.cpp_read_polygon_soa(fn)

cuspatial/_lib/soa_readers.pyx in cuspatial._lib.soa_readers.cpp_read_polygon_soa()

cuspatial/_lib/soa_readers.pyx in cuspatial._lib.soa_readers.cpp_read_polygon_soa()

RuntimeError: cuDF failure at: /rapids/cuspatial/cpp/src/utility/utility.hpp:192: numbers of groups/features/rings/vertices must be positive

This is against a file that imports ok with shapefile as in the shapely_locust demo:

plyreader = shapefile.Reader(fn)
polygon = plyreader.shapes()
plys = []
for shape in polygon:
    plys.append(Polygon(shape.points))

@thomcom
Copy link
Contributor

thomcom commented Sep 10, 2019

Sorry, Randy. This PR has the updated demos:
#44

@thomcom
Copy link
Contributor

thomcom commented Sep 10, 2019

Fixed by #44

@thomcom thomcom closed this as completed Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs Triage Need team to review and classify
Projects
None yet
Development

No branches or pull requests

2 participants