[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #VLP-531716]: extract lon lat from geotiff



Hi Alessio,

By default, NetCDF-Java does not know how to read a GeoTIFF (not as a CDM 
dataset, at least). However, there's a project called geotiff-iosp that 
implements an IOServiceProvider for it [1][2]. geotiff-iosp not only creates a 
CDM dataset from a GeoTIFF file, but it constructs a coordinate system for it 
too. It could be exactly what you need.

However, it looks like the project stopped receiving updates over two years 
ago, so I'm not sure if it still works. But at the very least, you could study 
the source code to see how it works.

Cheers,
Christian

[1] 
https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/tutorial/IOSPoverview.html
[2] https://github.com/USGS-CIDA/geotiff-iosp

> Good morning,
> I have a geotiff file and with *gdalinfo *command I found following infos:
> 
> 
> Size is 1200, 1400
> Coordinate System is:
> PROJCS["unnamed",
> GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.257223563,
> AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4326"]],
> PROJECTION["Transverse_Mercator"],
> PARAMETER["latitude_of_origin",42],
> PARAMETER["central_meridian",12.5],
> PARAMETER["scale_factor",1],
> PARAMETER["false_easting",0],
> PARAMETER["false_northing",0],
> UNIT["metre",1,
> AUTHORITY["EPSG","9001"]]]
> Origin = (-598884.437500000000000,650790.250000000000000)
> Pixel Size = (996.479919433593750,-999.677795410156250)
> Metadata:
> AREA_OR_POINT=Area
> TIFFTAG_DATETIME=2018:04:01 00:10:06
> TIFFTAG_DOCUMENTNAME=/datamet/data/tmp/export/RADAR/36/RRN/VMI/VMI.geotif
> TIFFTAG_IMAGEDESCRIPTION=IDL TIFF file
> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
> TIFFTAG_SOFTWARE=IDL 8.3, Exelis Visual Information Solutions, Inc.
> TIFFTAG_XRESOLUTION=100
> TIFFTAG_YRESOLUTION=100
> Image Structure Metadata:
> COMPRESSION=LZW
> INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( -598884.438,  650790.250) (  4d32'13.20"E, 47d34'44.14"N)
> Lower Left  ( -598884.438, -748758.664) (  5d56'18.16"E, 35d 4'36.70"N)
> Upper Right (  596891.466,  650790.250) ( 20d26'12.34"E, 47d34'50.73"N)
> Lower Right (  596891.466, -748758.664) ( 19d 2'23.69"E, 35d 4'40.94"N)
> Center      (    -996.486,  -48984.207) ( 12d29'17.00"E, 41d33'32.31"N)
> Band 1 Block=1200x1 Type=Float32, ColorInterp=Gray
> 
> 
> *Can you tell me a possible algorithm to associate a pair of lat lon
> coordinates to each point of the grid?*
> 
> Thanks in advance
> 
> Best regards
> 
> Alessio Frabotta

Ticket Details
===================
Ticket ID: VLP-531716
Department: Support netCDF Java
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.