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

feat: add open option FORCE_SRS_DETECTION in case of gml files and if… #13

Conversation

kapil-agnihotri
Copy link
Contributor

… source_srs is not set

ING-4473

@kapil-agnihotri
Copy link
Contributor Author

I had tough time with docker to test the functionality throughly but tested positive cases and it worked as expected.

Command echoed to console from the script that generated prj file

Command: time ogr2ogr -oo FORCE_SRS_DETECTION=YES -f "ESRI Shapefile" "/data/target/test.shp" "/data/org.584.c907a41c-73af-43c5-95c8-9c293565d9c9_wfs.gml"

@kapil-agnihotri kapil-agnihotri force-pushed the feat-add-open-option-FORCE_SRS_DETECTION-in-case-of-gml-files-and-if-source_srs-is-not-set branch from da0d49c to 644572b Compare October 28, 2024 16:59
driverShortName=$(ogrinfo -json $source_loc | jq -r '.driverShortName')
echo "Driver Short Name: $driverShortName"
# Check if driverShortName is GML and source_srs is not set
if [ "$driverShortName" == "GML" ] && [ -z "$source_srs" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& [ -z "$source_srs" ] seems redundant because we are already in the else case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

@kapil-agnihotri kapil-agnihotri force-pushed the feat-add-open-option-FORCE_SRS_DETECTION-in-case-of-gml-files-and-if-source_srs-is-not-set branch from 644572b to 3769a5e Compare October 29, 2024 08:52
@kapil-agnihotri kapil-agnihotri merged commit c134c29 into master Oct 29, 2024
3 checks passed
@kapil-agnihotri kapil-agnihotri deleted the feat-add-open-option-FORCE_SRS_DETECTION-in-case-of-gml-files-and-if-source_srs-is-not-set branch October 29, 2024 08:55
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

Successfully merging this pull request may close these issues.

2 participants