Converting GeoTIFF projection definition to proj4

المشرف العام

Administrator
طاقم الإدارة
I'm working with las/laz files which often have GeoTIFF information attached to them. However, for further processing I need proj4 definitions. http://spatialreference.org/ has helped me so far to convert between both manualy but ideally I'd like to do that automatically.Is this possible somehow?

Here 2 examples of the GeoTIFF information I have and the resulting proj4 string according to spatialreference.org

GeoTIFF:

reserved 43707 user ID 'LASF_Projection' record ID 34735 length after header 72 description 'GeoTIFF GeoKeyDirectoryTag' GeoKeyDirectoryTag version 1.1.0 number of keys 8 key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected key 1025 tiff_tag_location 0 count 1 value_offset 1 - GTRasterTypeGeoKey: RasterPixelIsArea key 1026 tiff_tag_location 34737 count 14 value_offset 0 - GTCitationGeoKey: CH1903 / LV03 key 2049 tiff_tag_location 34737 count 7 value_offset 14 - GeogCitationGeoKey: CH1903 key 2054 tiff_tag_location 0 count 1 value_offset 9102 - GeogAngularUnitsGeoKey: Angular_Degree key 2062 tiff_tag_location 34736 count 3 value_offset 0 - key ID 2062 not implemented key 3072 tiff_tag_location 0 count 1 value_offset 21781 - ProjectedCSTypeGeoKey: CH1903 / LV03 key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Metervariable length header record 2 of 4: reserved 43707 user ID 'LASF_Projection' record ID 34736 length after header 24 description 'GeoTIFF GeoDoubleParamsTag' GeoDoubleParamsTag (number of doubles 3) 674.4 15.1 405.3variable length header record 3 of 4: reserved 43707 user ID 'LASF_Projection' record ID 34737 length after header 22 description 'GeoTIFF GeoAsciiParamsTag' GeoAsciiParamsTag (number of characters 22) CH1903 / LV03|CH1903|variable length header record 4 of 4: reserved 43707 user ID 'liblas' record ID 2112 length after header 715 description 'OGR variant of OpenGIS WKT SRS'proj4:

"+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs"GeoTIFF:

description 'GeoTIFF GeoKeyDirectoryTag' GeoKeyDirectoryTag version 1.1.0 number of keys 11 key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected key 1025 tiff_tag_location 0 count 1 value_offset 1 - GTRasterTypeGeoKey: RasterPixelIsArea key 1026 tiff_tag_location 34737 count 31 value_offset 0 - GTCitationGeoKey: NAD83 / UTM zone 10N + VERT_CS key 2049 tiff_tag_location 34737 count 6 value_offset 31 - GeogCitationGeoKey: NAD83 key 2054 tiff_tag_location 0 count 1 value_offset 9102 - GeogAngularUnitsGeoKey: Angular_Degree key 3072 tiff_tag_location 0 count 1 value_offset 26910 - ProjectedCSTypeGeoKey: UTM 10 northern hemisphere key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter key 4096 tiff_tag_location 0 count 1 value_offset 5703 - VerticalCSTypeGeoKey: NAVD88 height (Reserved EPSG) key 4097 tiff_tag_location 34737 count 14 value_offset 37 - VerticalCitationGeoKey: NAVD88 height key 4098 tiff_tag_location 0 count 1 value_offset 5103 - VerticalDatumGeoKey: Vertical Datum Codes 5103 key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Metervariable length header record 2 of 3: reserved 43707 user ID 'LASF_Projection' record ID 34737 length after header 51 description 'GeoTIFF GeoAsciiParamsTag' GeoAsciiParamsTag (number of characters 51) NAD83 / UTM zone 10N + VERT_CS|NAD83|NAVD88 height|variable length header record 3 of 3: reserved 43707 user ID 'liblas' record ID 2112 length after header 951 description 'OGR variant of OpenGIS WKT SRS'proj4:

"+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"

أكثر...
 
أعلى