Open robmarkcole opened 2 months ago
This seems like an issue potentially unique to your data? It will be hard to debug without an example. Can you provide a small, non-sensitive test image that reproduces your issue?
At the very least, please paste the whole stack trace as it seems to be chopped off in the middle. As it stands, it seems like rasterio
or pyproj
just doesn't support that CRS? Hard to tell.
I've no issue opening with rasterio
Thank you. I am not able to reproduce with your example however.
>>> import fiftyone as fo
>>> ds=fo.Dataset.from_dir("data", dataset_type=fo.types.GeoTIFFDataset, label_field="location")
100% |███████████████████████████████████████████████████████████████████████████████████| 1/1 [269.5ms elapsed, 0s remaining, 3.7 samples/s]
>>> ds.first().location
<GeoLocation: {
'id': '66d1cf90bf68b63e4b2b7aff',
'tags': [],
'point': [104.06648594333119, 1.2362626908143242],
'line': None,
'polygon': [
[
[104.06303347762334, 1.2397351518883317],
[104.06993598244, 1.2397376011299024],
[104.06993840007095, 1.2327902182699888],
[104.06303591319048, 1.2327877827578355],
[104.06303347762334, 1.2397351518883317],
],
],
}>
My package versions (fresh environment pip install just now)
fiftyone==0.22.1
pyproj==3.6.1
rasterio==1.3.10
OK the issue is there are also png files in that folder
Got it yeah that won't work, it doesn't check file extension before trying to open the file. Can we close this? 🙌🏼
I feel it would be good to at least raise a warning if a non tif is opened
Ok would you like to submit a PR proposal?
One idea that is idiomatic with other fiftyone
methods is an argument to the GeoTIFFImporter skip_failures=True
. If True
, it would just completely ignore the file and not add that sample. If False
then an exception is raised. We could wrap the exception you saw because whatever came out of rasterio
/pyproj
was obviously not helpful.
Sounds excellent, happy to take on but no promises on timeframe
Describe the problem
Geotiffs are in
EPSG:32648
and this raises an errorCode to reproduce issue
System information
python --version
): Python 3.10.10fiftyone --version
): FiftyOne v0.22.1Other info/logs
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?