-
Notifications
You must be signed in to change notification settings - Fork 3
Automating the Extraction of lat lon from Envi Header 'map info' based on UTM projection
Lewis John McGibbney edited this page Nov 15, 2018
·
1 revision
Based on the projection name found in map info
(key of the Envi Header), Apache Tika's EnviHeaderParser will process the metadata to extract map info
accordingly. Note, currently this only works for UTM projections... which is great as this is exactly what AVIRIS-C and AVIRIS-NG use.
The following algorithm defines the mapping from UTM to lat/lon
Envi Header with UTM projection name will produce a lat/lng coordinate based on the following algorithm: Extraction of lat/lng metadata for other projection names e.g. Sinusoidal, is not currently supported however it will be in the future.The above contributions were tracked under TIKA-2770 and the final pull request was made to the Apache Tika source code under pull request #257. An example of a metadata record with this patch applied can be seen below
With a .hdr file containing map info
encoded as UTM
curl -T ang20150420t182050_corr_v1e_img.hdr http://localhost:9998/meta --header "Content-Type: application/envi.hdr"
"envi.byte.order","0"
"X-Parsed-By","org.apache.tika.parser.DefaultParser","org.apache.tika.parser.envi.EnviHeaderParser"
"envi.map.info","{ UTM , 1.000 , 1.000 , 724522.127 , 4074620.759 , 1.1000000000e+00 , 1.1000000000e+00 , 12 , North , WGS-84 , units=Meters , rotation=75.00000000 }"
"envi.description","{ Georeferenced Image built from input GLT. [Wed Jun 10 04:37:54 2015] [Wed Jun 10 04:48:52 2015]}description = { Georeferenced Image built from input GLT. [Wed Jun 10 04:37:54 2015] [Wed Jun 10 04:48:52 2015]}"
"envi.sensor.type","Unknown"
"envi.bands","432"
"envi.header.offset","0"
"language","en"
"envi.interleave","bil"
"envi.wavelength.units","Nanometers"
"envi.lines","14674"
"envi.file.type","ENVI Standard"
"envi.samples","739"
"envi.lat/lon","36.79077627261556, -108.48370867914815"
"Content-Encoding","ISO-8859-1"
"envi.data.type","4"
"Content-Type","application/envi.hdr"
And then with a .hdr file with non-UTM map info
...
lmcgibbn@LMC-056430 /usr/local/tika/tika-parsers/src/test/resources/test-documents(TIKA-2270) $ curl -T envi_test_header.hdr http://localhost:9998/meta --header "Content-Type: application/envi.hdr"
"envi.byte.order","0"
"X-Parsed-By","org.apache.tika.parser.DefaultParser","org.apache.tika.parser.envi.EnviHeaderParser"
"envi.map.info","{Sinusoidal, 1.5000, 1.5000, -10007091.3643, 5559289.2856, 4.6331271653e+02, 4.6331271653e+02, , units=Meters}"
"envi.sensor.type","Unknown"
"envi.bands","7"
"envi.header.offset","0"
"envi.projection.info","{16, 6371007.2, 0.000000, 0.0, 0.0, Sinusoidal, units=Meters}"
"language","en"
"envi.interleave","bip"
"envi.wavelength.units","Unknown"
"envi.lines","2400"
"envi.file.type","ENVI Standard"
"envi.samples","2400"
"Content-Encoding","ISO-8859-1"
"envi.data.type","2"
"Content-Type","application/envi.hdr"