Skip to content

Instantly share code, notes, and snippets.

@daveluo
Last active November 12, 2020 16:03
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save daveluo/57ada6ba61ff7c947aad8d6aaeeeb9e4 to your computer and use it in GitHub Desktop.
Save daveluo/57ada6ba61ff7c947aad8d6aaeeeb9e4 to your computer and use it in GitHub Desktop.
opencitiesaichallenge-pystac-starter
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@crikeli
Copy link

crikeli commented Feb 22, 2020

Hey Dave, Thanks a lot for this gist -- it's super helpful! I am having issues with In [20] though... There seems to be a mismatch of the crs values(the win_box_gdf) seems to have a type attribute (+type=crs) which scene_labels_gdf does not seem to have. Any ideas on how to solve this? I used the "to_crs" method on both data frames to no avail.

Look forward to your reply!

@daveluo
Copy link
Author

daveluo commented Feb 23, 2020

hi @crikeli, thanks for your interest and flagging this issue. I'm pretty sure it's because the new geopandas 0.7.0 release which just came out updated the crs type and broke using dicts for crs (i.e. {'init':'epsg:4326'}). Try to update the crs types used to be a pyproj.CRS object per the gpd release note.

I'll aim to fix the notebook to work with 0.7.0 on Monday but if you aren't able to fix the type and want to successfully run through everything in the meantime, pip install geopandas==0.6.3 should work.

@crikeli
Copy link

crikeli commented Feb 24, 2020

Fantastic, thanks for this - it worked. Yeah, I tried following the new geo-pandas docs to figure it out, but to no avail.
I imagine it has something to do with pyproj as you mentioned. Thanks again for your work!

@daveluo
Copy link
Author

daveluo commented Feb 27, 2020

@crikeli, i've updated gist which should now work with the latest geopandas update. Mainly changed the crs from a dict to pyproj's CRS.from_epsg(4326) Let me know if that works or you run into any more issues.

@crikeli
Copy link

crikeli commented Feb 28, 2020

fantastic! Works great!! Thanks

@Akshaypatil7
Copy link

@daveluo, I am getting JSON decode error while accessing train_tier_1/catalog.json file. Can someone help me on this

@Hsengiv2000
Copy link

@daveluo, I am getting JSON decode error while accessing train_tier_1/catalog.json file. Can someone help me on this

did you manage to fix this? I have the same issue

@Hsengiv2000
Copy link

@daveluo, I am getting JSON decode error while accessing train_tier_1/catalog.json file. Can someone help me on this

did you manage to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment