Comments (3)
Maybe you are testing something else than what you believe, but I cannot directly say what happens. However, I made the most simple test that I could.
Create couple of images with the same geolocation, one with pixel value=100, the other with pixel value=200
gdal_create -of GTiff -ot byte -outsize 100 100 -bands 1 -burn 100 -a_srs epsg:3067 -a_ullr 500000 600000 500500 599500 image1.tif
gdal_create -of GTiff -ot byte -outsize 100 100 -bands 1 -burn 200 -a_srs epsg:3067 -a_ullr 500000 600000 500500 599500 image2.tif
Create couple of vrt files with different image orders
gdalbuildvrt vrttest1.vrt image1.tif image2.tif
gdalbuildvrt vrttest2.vrt image2.tif image1.tif
Now vrttest1.vrt has image2 with value=200 at the bottom, and vrttest2.vrt has image1 with value=100 at the bottom. A test with gdallocationinfo gives expected results:
gdallocationinfo vrttest1.vrt 0 0
Report:
Location: (0P,0L)
Band 1:
<LocationInfo><File>image1.tif</File><File>image2.tif</File></LocationInfo>
Value: 200
C:\data\000\gdaltest\vrt>gdallocationinfo vrttest2.vrt 0 0
Report:
Location: (0P,0L)
Band 1:
<LocationInfo><File>image2.tif</File><File>image1.tif</File></LocationInfo>
Value: 100
from gdal.
Because you have source images with different resolutions you should read this https://gdal.org/programs/gdalbuildvrt.html#cmdoption-gdalbuildvrt-resolution and try
gdalbuildvrt index2.vrt Copernicus_DSM_COG_30_N51_00_E000_00_DEM.tif ALPSMLC30_N051E000_DSM.tif -resolution highest
gdallocationinfo -wgs84 index2.vrt 0 51.4
Report:
Location: (2P,2161L)
Band 1:
<LocationInfo><File>Copernicus_DSM_COG_30_N51_00_E000_00_DEM.tif</File><File>ALPSMLC30_N051E000_DSM.tif</File></LocationInfo>
Value: 64
Looks correct, but I have never done this before myself.
from gdal.
Thank you.
from gdal.
Related Issues (20)
- Support for GML ArcByCenterPoint tag HOT 7
- Option to set CRS of an OGR Layer HOT 1
- Warning 1: PROJ: proj_create_from_database: C:\Program Files\GDAL\projlib\proj.db contains DATABASE.LAY OUT.VERSION.MINOR = 2 whereas a number >= 3 is expected. It comes from another PROJ installation. HOT 2
- Update gdalinfo -json output to support STAC EO extension 2.0
- gdalwarp and vertical transform with Nodata in the transform grid HOT 4
- DXF: cannot read SPLINE without control points HOT 6
- Date type NULL values are treated as '0000/00/00' on PostgreSQL COPY import
- SpatialReference.EPSGTreatsAsNorthingEasting missing from Java bindings HOT 6
- Issue with construction of server path on the OAPIF driver HOT 3
- OGR SQL dialect: it is not possible to set the `\` (backslash) char as the escape char with the `ESCAPE` clause
- GDAL-3.9.1 compilation error
- PDS4 files disp:horizontal_display_direction label should be taken into account.
- C++ API documentation doesn't say which header files to include HOT 1
- cmake --install installs Python bindings without RUNPATH set HOT 4
- libgdal.so.35.3.9.0: undefined reference to `PoDoFo… HOT 2
- PDF driver add trailer/EOF instructions that make them PDF/X invalid HOT 4
- JPEG 12-bit compression for NITF Files HOT 6
- NBIT creation option support for NITF JPEG2000 compression
- Heap corruption in shapefile driver HOT 1
- gdal.VectorTranslate: "No such file or directory" when converting from PostgreSQL HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdal.