Using a shape file for my area of interest, I am having trouble moving forward with the following error:
ValueError: sentinelhub-py supports only WGS 84 coordinate reference system with coordinate order lng-lat. However pyproj.CRS(4326) has coordinate order lat-lng.
Here is a snippet that demonstrates why the issue happens:
import pyproj
import sentinelhub
lat_lng_def = pyproj.CRS(4326)
lng_lat_def = sentinelhub.CRS.WGS84.pyproj_crs()
# the following works
sentinelhub.CRS(lng_lat_def)
# the following raises an error
sentinelhub.CRS(lat_lng_def)
Basically, in sentinelhub-py we use lng-lat coordinate order and in pyproj by default lat-lng order is used. Therefore sentinelhub-py raises an error whenever pyproj.CRS(4326) would be converted in sentinelhub.CRS.WGS84 to prevent potential mismatches in coordinate order.
I don’t know how you pass a CRS parameter to sentinelhub-py but I suggest that instead of pyproj.CRS(4326) you simply use sentinelhub.CRS.WGS84.
In the future, we intend to change the error into a warning. That is because many packages (e.g. geopandas) use pyproj.CRS(4326) but internally interpret coordinates with order lng-lat. Therefore, in such cases a conversion could still be ok.
When I try to run this command I come up with this error,
ValueError: sentinelhub-py supports only WGS 84 coordinate reference system with coordinate order lng-lat. However pyproj.CRS(4326) has coordinate order lat-lng
When I tried this I am getting the following Error.
ValueError: The list of shapes must contain shapes of types <class ‘type’>, <class ‘type’> or subtype of <class ‘abc.ABCMeta’>