Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG]: Georegistering the dataframe into longitude, latitude coordinates

See original GitHub issue

Thank you for helping us improve solaris!

Summary of the bug

A clear and concise description of what the bug is.

Georegistering the dataframe into longitude, latitude coordinates

result_polys = sol.vector.polygon.georegister_px_df(mask2poly, affine_obj=tile_tfm, crs= ‘epsg:4326’) type(result_polys) geopandas.geodataframe.GeoDataFrame


Buggy behavior and/or error message

ValueError Traceback (most recent call last) <ipython-input-151-55ff1c6de4ee> in <module> ----> 1 sol.utils.geo.gdf_get_projection_unit(result_polys)

~\Anaconda3\envs\solaris\lib\site-packages\solaris\utils\ in gdf_get_projection_unit(vector_file) 343 “”" 344 c = _check_gdf_load(vector_file) –> 345 crs = _check_crs( 346 srs = osr.SpatialReference() 347 srs.ImportFromEPSG(crs.to_epsg())

~\Anaconda3\envs\solaris\lib\site-packages\solaris\utils\ in _check_crs(input_crs) 91 elif isinstance(input_crs, str): 92 # handle PROJ4 strings, epsg strings, wkt strings —> 93 out_crs = 94 elif isinstance(input_crs, 95 out_crs = input_crs

~\Anaconda3\envs\solaris\lib\site-packages\rasterio\ in from_string(cls, string, morph_from_esri_dialect) 343 344 elif string.strip().upper().startswith(‘EPSG:’): –> 345 auth, val = string.strip().split('😂 346 if not val: 347 raise CRSError(“Invalid CRS: {!r}”.format(string))

ValueError: too many values to unpack (expected 2)

Expected behavior

It should display units of the coordinate reference systems. The unit i.e. meter, metre, or degree, of the projection.

Environment information

  • OS: Windows 10
  • solaris version: 0.2.0
  • python version: 3.6.7
  • pyproj version: 2.4.2.post1
  • fiona version: 1.8.13

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

nrweircommented, Jan 6, 2020

@ishaankochhar now! 😃

nrweircommented, Jan 3, 2020

Issues weren’t entirely resolved with #319, now done with #322. will be releasing 0.2.1 now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Convert data frame to spatial coordinates
First, you take the columns of lon and lat and create an object for coord . Then, you subtract them from the original...
Read more >
Automatically Retrieving Geographic Coordinates (Geocoding ...
Exception/ error handling 4. Adding the latitude and longitude coordinate information into separate columns and generating a new Pandas ...
Read more >
Create a column 'geometry' of points with longitude and ...
I have loaded a .csv data into a pandas DataFrame and want to create a column named 'geometry' which will be made up...
Read more >
Data preparation - Spatial Data Science with R
The convention used here is to organize the coordinates columns so that longitude is the first and latitude the second column (think x...
Read more >
not a code bug, but a data issue · Issue #223 · ropensci/spocc
I can try to get the verbatim location info from the data sources to ... "1145396883") %>% data.frame #> name longitude latitude prov...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found