Changes between Version 1 and Version 2 of rfc32_gdallocationinfo
- Timestamp:
- Oct 31, 2010, 12:30:12 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rfc32_gdallocationinfo
v1 v2 42 42 }}} 43 43 44 == LocationInfo Metadata Domain ==44 == !LocationInfo Metadata Domain == 45 45 46 The pixel values and location transformation logic is all built into gdallocationinfo and doesn't require much elaboration. The more exotic portion is reporting of " LocationInfo" queried from the datasource.46 The pixel values and location transformation logic is all built into gdallocationinfo and doesn't require much elaboration. The more exotic portion is reporting of "!LocationInfo" queried from the datasource. 47 47 48 For our immediate needs the requirement is to have the VRTSourcedRasterBand return information on the file(s) overlapping the target pixel. But, in theory different drivers might return different sorts of information about a location. For instance, a WMS driver might issue a GetFeatureInfo for the location and return the result.48 For our immediate needs the requirement is to have the VRTSourcedRasterBand return information on the file(s) overlapping the target pixel. But, in theory different drivers might return different sorts of information about a location. For instance, a WMS driver might issue a !GetFeatureInfo for the location and return the result. 49 49 50 The mechanism to query the datasource is a specially named GetMetadataItem() request against the "LocationInfo" domain of the target band(s). The following requested item name is of the form "Pixel_x_y" where x and y are the pixel and line of the pixel being queried.50 The mechanism to query the datasource is a specially named !GetMetadataItem() request against the "!LocationInfo" domain of the target band(s). The following requested item name is of the form "Pixel_x_y" where x and y are the pixel and line of the pixel being queried. 51 51 52 The returned value from this item should either be NULL, or an XML documented with the root element "<LocationInfo>". The contents of the document are otherwise undefined as long as they are well formed XML. The VRT driver returns a series of <File>xxx</File> entries for each of the files at that location. 52 The returned value from this item should either be NULL, or an XML documented with the root element "<!LocationInfo>". The contents of the document are otherwise undefined as long as they are well formed XML. The VRT driver returns a series of <File>xxx</File> entries for each of the files at that location. 53 54 eg. 55 {{{ 56 GDALGetMetadataItem( hBand, "Pixel_100_200", "LocationInfo" ); 57 }}} 58 59 might return: 60 61 {{{ 62 <LocationInfo> 63 <File>utm.tif</File> 64 </LocationInfo> 65 }}} 53 66 54 67 == Test Suite ==