cuspatial
cuspatial copied to clipboard
[FEA] Any plans for a coordinate transformation/projection function?
Hi there,
I was wondering if this lib offers a way for me to project a large cudf from lon/lat to UTM zone (e.g. .to_crs() in Dask GeoPandas)?
Many thanks for any help, and for this amazing lib! :)
It's certainly something we are considering. Is lonlat to UTM the only projection you need?
We do have a simple lonlat to Cartesian (takes an origin point) API: https://docs.rapids.ai/api/cuspatial/stable/api.html#cuspatial.lonlat_to_cartesian
It's certainly something we are considering. Is lonlat to UTM the only projection you need?
Great, thanks for the info. I predominantly only project to UTM, so this would be of most use to me.
Hi! Thanks for taking a look! Do you need lon/lat to specific coordinates within the UTM zone, or do you only want to identify which zone each lon/lat falls into?
Thank you!
Do you need lon/lat to specific coordinates within the UTM zone, or do you only want to identify which zone each lon/lat falls into?
I need both really (i.e. first identify which UTM zone my points are in, and then transform them to this).
You could easily use https://apps.gis.ucla.edu/geodata/dataset/world_utm_zones with point in polygon to identify which coordinates are within each zone. Projecting them into zone coordinates is another problem unfortunately.
It seems possible to build a UTM projection using lonlat to Cartesian and a few known fixed coordinates inside or on the boundaries of each UTM zone.
I know that projections into specific coordinate systems can have many particularities. I'd love to support coordinate system transformations as one of our next major features. There are lots of coordinate systems to support. :)
You could easily use https://apps.gis.ucla.edu/geodata/dataset/world_utm_zones with point in polygon to identify which coordinates are within each zone.
Great tip, thanks!
I know that projections into specific coordinate systems can have many particularities. I'd love to support coordinate system transformations as one of our next major features. There are lots of coordinate systems to support. :)
That's fair enough, thanks for any help - in case it helps, I've used pyproj for achieving this (on CPU):
utm_eastings, utm_northings = Proj(utm_epsg_code)(df["lon"].values, df["lat"].values)
It would be cool if we could somehow compile this to GPU, but I imagine/guess it might be a case of re-writing that sort of functionaility with GPU libs (maybe like numba, cupy,...?)
Actually, you've contributed a great deal just by pointing out https://github.com/OSGeo/PROJ. That's the best lead I've seen yet for us finding implementations and approaches for the numerous coordinate systems I mention above.
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
I was wondering if this lib offers a way for me to project a large cudf from lon/lat to UTM zone
@asmith26 any chance you can provide more information? e.g. how large is large (how many coordinates)? Anything else you can tell us about your use case / project to help us prioritize?
Thanks! CC @jarmak-nv
Thanks for asking @harrism
- How Large: Many of my datasets are in the 100's of millions of coordinates, and (I think) all are <10 billion rows.
- More info: I have a number of projects that take data in lon/lat and convert these to a single UTM Zone for running machine learning algorithms on (since UTM works in metres it makes it easier to grid the data and run prediction on these).
Hope this helps!
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
Hi @asmith26 - just wanted to let you know that we have a new library, cuProj, coming with the 23.08 release that GPU accelerates projections between WGS and UTM. You can check out the README here, and 23.08 should be releasing at the end of next week :tada:
Many thanks for the info and for your help. This will help me greatly! :)