Putting my metadata where my mouth is [Re: [Xastir] Re: Bounding boxes]
Tom Russo
russo at bogoflux.losalamos.nm.us
Tue Oct 14 14:01:52 EDT 2003
On Tue, Oct 14, 2003 at 10:04:14AM -0600, a Mr. Richard Feyler of Fort Lee, New Jersey <russo at bogoflux.losalamos.nm.us> writes 'Dear Rosanne Rosannadanna':
> On Tue, Oct 14, 2003 at 07:59:40AM -0500, a Mr. Richard Feyler of Fort Lee, New Jersey <gerry.creager at tamu.edu> writes 'Dear Rosanne Rosannadanna':
> > If it doesn't have metadata, even if you can find what might pass as
> > sufficient information, it remains nothing more than an otherwise
> > undocumented picture.
>
> I agree. The web site that distributed those geotiff files did have a
> complete exposition of the metadata, but as a separate human-readable PDF,
> not in the geotiff metadata keys, even while saying they were georeferenced
> images. That's a pretty big goof IMNSHO, but could be corrected with a
> little work. Just have to know the arcana of geotiff keys and geotifcp's
> metadata file format well enough to encode the projection parameters in the
> PDF back into the geotiff files. There weren't that many to deal with (IIRC,
> the units (us-survey feet), the projection (2-standard parallel version of
> lambert conformal conic), the relevent parallels and meridian, and the false
> easting and northing, plus the relevant codes to specify that it was a
> user-defined projection rather than one of the standard numbered PCS's).
And since I said it was so easy, I actually tried it and took the b40.tif
file Tyler originally pointed me at, which produced this from listgeo:
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
5205005.7 4299352.26 0
ModelPixelScaleTag (1,3):
6.6667 6.6667 0
End_Of_Tags.
Keyed_Information:
End_Of_Keys.
End_Of_Geotiff.
Corner Coordinates:
Upper Left (5205005.699,4299352.261)
Lower Left (5205005.699,4253418.698)
Upper Right (5241025.879,4299352.261)
Lower Right (5241025.879,4253418.698)
Center (5223015.789,4276385.479)
I then created a file (b40.metadata) that added to it, like so:
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
5205005.7 4299352.26 0
ModelPixelScaleTag (1,3):
6.6667 6.6667 0
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short, 1): ModelTypeProjected
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
GeographicTypeGeoKey (Short,1): GCS_NAD83
ProjectedCSTypeGeoKey (Short,1): User-Defined
ProjectionGeoKey (Short,1): User-Defined
ProjLinearUnitsGeoKey (Short,1): Linear_Foot_US_Survey
ProjCoordTransGeoKey (Short,1): CT_LambertConfConic_2SP
ProjStdParallel1GeoKey (Double,1): 38.6667
ProjStdParallel2GeoKey (Double,1): 37.0833
ProjFalseOriginLatGeoKey (Double,1): 36.3333
ProjFalseOriginLongGeoKey (Double,1): -85.75
ProjFalseEastingGeoKey (Double,1): 1500000.00
ProjFalseNorthingGeoKey (Double,1): 1000000.00
End_Of_Keys.
End_Of_Geotiff.
Corner Coordinates:
Upper Left (5205005.699,4299352.261)
Lower Left (5205005.699,4253418.698)
Upper Right (5241025.879,4299352.261)
Lower Right (5241025.879,4253418.698)
Center (5223015.789,4276385.479)
The only difference between this and the previous is teh stuff in the
"Keyed_Information" block, which will not change from map to map (of the set
on the Kentucky web site in question). I then stuffed it into an uncompressed
tiff:
geotifcp -g b40.metadata -c none b40.tif b40_tvr.tif
and copied that to my Xastir maps directory.
When loaded in, the map appears in the right place in the US, and the few
vector maps of roads, county lines and such that I have seem to line up
pretty well. The map in question happens to have a UTM grid drawn in, and
when I position my mouse cursor to grid intersections and observe the status
line with my coord system set to UTM, the results I see are sane.
So, Tyler, if you're willing to do a one-time "listgeo/hack on output/geotifcp"
cycle on every map (could easily be automated with a perl or even sed script),
you've got a free source of all the Kentucky maps you could download! Hope
this helps,
T.
--
Tom Russo KM5VY QRPL #1592 K2#398 http://www.swcp.com/~russo/
Tijeras, NM DM64ux SOC #236 AHTB#1 http://www.qsl.net/~km5vy/
"The older I grow the more I distrust the familiar doctrine that age
brings wisdom." -- H.L. Mencken
More information about the Xastir
mailing list