[BUG]: Georegistering the dataframe into longitude, latitude coordinates
See original GitHub issueThank 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
sol.utils.geo.gdf_get_projection_unit(result_polys)
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\geo.py in gdf_get_projection_unit(vector_file) 343 “”" 344 c = _check_gdf_load(vector_file) –> 345 crs = _check_crs(c.crs) 346 srs = osr.SpatialReference() 347 srs.ImportFromEPSG(crs.to_epsg())
~\Anaconda3\envs\solaris\lib\site-packages\solaris\utils\core.py in _check_crs(input_crs) 91 elif isinstance(input_crs, str): 92 # handle PROJ4 strings, epsg strings, wkt strings —> 93 out_crs = rasterio.crs.CRS.from_string(input_crs) 94 elif isinstance(input_crs, rasterio.crs.CRS): 95 out_crs = input_crs
~\Anaconda3\envs\solaris\lib\site-packages\rasterio\crs.py 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:
- Created 4 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
@ishaankochhar now! 😃
Issues weren’t entirely resolved with #319, now done with #322. will be releasing 0.2.1 now.