Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-populating spatial reference #150

Open
pberkowitz-kfs opened this issue May 12, 2022 · 5 comments
Open

Auto-populating spatial reference #150

pberkowitz-kfs opened this issue May 12, 2022 · 5 comments

Comments

@pberkowitz-kfs
Copy link

Email sdmapps@usgs.gov if you wish to contact the USGS Science Data Management (SDM) team’s application support inbox directly with bugs or feature requests. Otherwise, use the template below.

When I browse to a spatial dataset to try to bring in the spatial reference system, I get the following message in a popup window:
"Problem encountered extracting bounding coordinates. Problem encountered extracting spatial reference."

From Spatial tab, click and open any shapefile. My co-worker tried this procedure for a TIFF file and received the same message.

We expected the MW to load the spatial reference info from the file we browsed to (either a SHP file or TIFF).

OS: Windows 10
MW version 2.0.7

@aritchie-usgs
Copy link

I encounter the same problem trying to extract spatial reference from a 13GB COG geotiff. Wondering if the problem is related to either the size (BIGTIFF) or the format (COG).

problem was reproduced on a local copy of a 13GB COG GeoTiff I made as part of an emergency data release, available here:

https://cmgp-sfm-public-read-bucket.s3.us-west-2.amazonaws.com/aritchie/2020_CZU_Fire/USGS_PCMSC_RSCC_CZU_20201104-05_ortho_NAD83_2011_UTM10_COG.tif

@Joshdpaul
Copy link

I am having the same issue. Windows 10, MetadataWizard 2.0.7.

The tool failed to load a simple bounding box shapefile only 1KB in size. Thinking that my projection may be the issue (Alaska Albers), I also tried with a reprojected version of the shapefile in WGS84. Result was the same. Both files are in the zip attached here if anyone wants to test them.

box.zip

@tnorkin
Copy link
Collaborator

tnorkin commented Dec 8, 2022

@Joshdpaul,
In the cases we've seen where the Metadata Wizard can't parse geospatial files, there's often something going on with the gdal python library on the user's machine. It only shows up for some users and we think it has to do with environment settings.

First, if your version of the Metadata Wizard was installed prior to June 2022, I'd recommend getting the most recent version from the releases page and reinstalling. There have been some recent minor updates that have solved the issue for some users.

If reinstalling the Wizard doesn't work for you, I'd recommend taking a look at your environment settings as the next step. If there's anything relating to an instance of gdal that's external to the Wizard, I'd recommend taking a look and possibly removing that setting. If a user has more than one copy of gdal installed (the Metadata Wizard contains its own copy of gdal), it's possible that the application is pointing to the wrong copy.

If you'd like additional support, please contact us at ask-sdm@usgs.gov and we can take a closer look at the errors you're running into.

@Joshdpaul
Copy link

@tnorkin ,

Thank you very much for the response, your advice led me in the right direction. I checked my Windows system variables and both the GDAL_PATH and PROJ_LIB variables were referencing a PostGreSQL package installed in one of my conda environments. After deleting both of these system variables and restarting, the shapefile import in the Metadata Wizard now works as expected.

@tnorkin
Copy link
Collaborator

tnorkin commented Dec 9, 2022

@Joshdpaul,
Excellent, thanks for letting us know it worked out, and also which updates you made to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants