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

Remove the option "Write absolute path" from gdal tileindex tool #19704

Closed
qgib opened this issue Oct 17, 2014 · 7 comments
Closed

Remove the option "Write absolute path" from gdal tileindex tool #19704

qgib opened this issue Oct 17, 2014 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Oct 17, 2014

Author Name: Pedro Venâncio (Pedro Venâncio)
Original Redmine Issue: 11428
Affected QGIS version: master
Redmine category:gdal_tools


Raster Tile Index (gdaltindex)(Raster -> Miscellaneous -> Tile Index)

always generates absolute paths, regardless of the "Write absolute path" option is selected or not.

Tested on QGIS 2.5.0-102 (OSGeo4W).


Related issue(s): #14049 (relates)
Redmine related issue(s): 4064


@qgib
Copy link
Contributor Author

qgib commented Oct 17, 2014

Author Name: Giovanni Manghi (@gioman)


does the gdal command, issued by the cli, return the correct results?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Oct 17, 2014

Author Name: Pedro Venâncio (Pedro Venâncio)


Yes Giovanni, in the cli, using -write_absolute_path generates absolute paths. Without that option, it generates relative paths. I'm with GDAL 1.11.1.

@qgib
Copy link
Contributor Author

qgib commented Oct 17, 2014

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented Oct 31, 2014

Author Name: Jürgen Fischer (@jef-n)


  • fixed_version_id was changed from Version 2.6 to Future Release - High Priority

@qgib
Copy link
Contributor Author

qgib commented Feb 21, 2015

Author Name: Pedro Venâncio (Pedro Venâncio)


Now I see that this isn't a QGIS problem, because it also happens at the command line.

If I put the command line in the folder where the raster files are located, gdaltindex works well, ie, with -write_absolute_path option, absolute paths are saved in the attribute table, and without -write_absolute_path option are saved only the names of files.

D:\\test\\2013\\tiff> gdaltindex -f "ESRI Shapefile" tile_index_processing_2.shp 171_2_52.tif 171_2_42.tif

But if I reference the input raster files with the absolute paths (for example, when files are in different folders), the -write_absolute_path option has no influence, because absolute paths are always recorded in the attribute table.

D:\\> gdaltindex -f "ESRI Shapefile" D:\\test\\2013\\tiff\\tile_index_processing_3.shp D:\\test\\2013\\tiff\\171_2_52.tif D:\\test\\2013\\171_2_42.tif

Like Even says here http://osgeo-org.1560.x6.nabble.com/gdal-dev-gdaltindex-produces-absolute-paths-td5188952.html

and http://www.gdal.org/gdaltindex.html

" -write_absolute_path: (...) By default the raster filenames will be put in the file exactly as they are specified on the command line. "

Thus, unless the raster files are stored in the same folder where QGIS Raster Tile Index tool runs, we will always have the absolute path in the result.
So, do you think we should hide this option in Raster Tile Index interface?

@qgib
Copy link
Contributor Author

qgib commented Feb 23, 2015

Author Name: Giovanni Manghi (@gioman)


So, do you think we should hide this option in Raster Tile Index interface?

yes, because anyway as it is implemented in qgis the path to input files (in the command line) will be always absolute, returning always an absolute path in the index.


  • subject was changed from Raster Tile Index always produces absolute paths to Remove the option "Write absolute path" from gdal tileindex tool

@qgib
Copy link
Contributor Author

qgib commented Sep 30, 2015

Author Name: Pedro Venâncio (Pedro Venâncio)


Pull request submitted to remove the "Write absolute path" option from gdal tileindex: #2343


  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats) labels May 25, 2019
@qgib qgib added this to the Future Release - High Priority milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant