Geoapplications development http://rgeo.wikience.org Higher School of Economics, Moscow, www.cs.hse.ru
2 Agenda • • •
3 Examples of geospatial raster data
4 Subset types • • •
5 Java libs to read/write rasters • • •
6 Geospatial raster file formats (>150 supported by GDAL) Arc/Info ASCII Grid NASA ELAS Image Display and Analysis (WinDisp) MG4 E ACE2 ENVI .hdr Labelled Raster ILWIS Raster Map (.mpr,.mpl) Multi-r ADRG/ARC Digitilized Raster Graphics (.gen/.thf) Epsilon - Wavelet compressed images Intergraph Raster Meteo Arc/Info Binary Grid (.adf) ERMapper (.ers) IRIS EUMET AIRSAR Polarimetric Envisat Image Product (.n1) ISCE raster NLAPS Azavea Raster Grid EOSAT FAST Format USGS Astrogeology ISIS cube (Version 2) NOAA Magellan BLX Topo (.blx, .xlb) FIT USGS Astrogeology ISIS cube (Version 3) NITF (. Bathymetry Attributed Grid (.bag) FITS (.fits) JAXA PALSAR Product Reader (Level 1.1/1.5) NetCD Microsoft Windows Device Independent Bitmap Fuji BAS Scanner Image Japanese DEM (.mem) NTv2 D (.bmp) Generic Binary (.hdr Labelled) JPEG JFIF (.jpg) Northw BPG (Better Portable Graphics) GeoPackage JPEG-LS Northw BSB Nautical Chart Format (.kap) Oracle Spatial GeoRaster JPEG2000 (.jp2, .j2k) OGDI Br VTP Binary Terrain Format (.bt) GSat File Format JPEG2000 (.jp2, .j2k) OZI OZ CALS Type I Graphics Interchange Format (.gif) JPEG2000 (.jp2, .j2k) PCI .aux CEOS (Spot for instance) WMO GRIB1/GRIB2 (.grb) JPEG2000 (.jp2, .j2k) PCI Geo DRDC COASP SAR Processor Raster GMT Compatible netCDF JPEG2000 (.jp2, .j2k) PCRast TerraSAR-X Complex SAR Data Product GRASS Raster Format JPIP (based on Kakadu) Geospat Convair PolGASP data GRASS ASCII Grid KEA NASA USGS LULC Composite Theme Grid Golden Software ASCII Grid KMLSUPEROVERLAY Planet DirectDraw Surface Golden Software Binary Grid KRO Portabl Spot DIMAP (metadata.dim) Golden Software Surfer 7 Binary Grid NOAA Polar Orbiter Level 1b Data Set (AVHRR) PostGI ELAS DIPEx GSC Geogrid Erdas 7.x .LAN and .GIS Netpb DODS / OPeNDAP Generic Tagged Arrays (.gta) FARSITE v.4 LCP Format R Obje First Generation USGS DOQ (.doq) TIFF / BigTIFF / GeoTIFF (.tif) Daylon Leveller Heightfield Rasdam New Labelled USGS DOQ (.doq) NOAA .gtx vertical datum shift NADCON .los/.las Datum Grid Shift Raster Military Elevation Data (.dt0, .dt1, .dt2) GXF - Grid eXchange File MBTiles Swedis Arc/Info Export E00 GRID Hierarchical Data Format Release 4 (HDF4) OziExplorer .MAP Raster ECRG Table Of Contents (TOC.xml) Hierarchical Data Format Release 5 (HDF5) In Memory Raster ROI_PA ERDAS Compressed Wavelets (.ecw) HF2/HFZ heightfield raster Vexcel MFF Raster ESRI .hdr Labelled Erdas Imagine (.img) Vexcel MFF2 RadarSa Erdas Imagine Raw Idrisi Ras Sentinel SAGA SAR CE
7 Common data model (CDM) • • • • • •
8 CDM architecture
9 Geospatial raster types • • • http://modis-atmos.gsfc.nasa.gov/MOD04_L2/grids.html http://meso-a.gsfc.nasa.gov/val/projects/gpm/swath/index.html
10 Model VS Storage (1) 1 2 3 4 1 1 2 2 3 4 3 4
11 Model VS Storage (2)
12 Model: several rasters in a single file (1) • • • • • • •
13 Model: several rasters in a single file (2) Product Period Datasets Format File name example AMIP/DOE Year, pres.sfc.1979.nc 1 NetCDF Reanalysis 2 6 hours pres.sfc.1980.nc MOD08_D3.A2000061.051.2010273 MODIS L3 Day, 210218.hdf >600 HDF4 Atmosphere Day MOD08_D3.A2000062.051.2010273 161753.hdf Month, ocnsst.l.gdas.198401.grb2 CFSR 1 Grib2 1 hour ocnsst.l.gdas.198402.grb2 MERRA200.prod.assim.tavg1_2d_lnd Day, MERRA 1..24 hrs 1.. HDF4 _Nx. 20000718.hdf OMI-Aura_L3- Aura satellite, Day, 14 HDF5 OMSO2e_2004m1001_v003- OMI radiometer Day 011m0526t144250.he5
raro@ubuntu-pelligrini:/mnt/hgfs/RS_DATA/Landsat8/LC81790212015146-SC20150806075046$ 14 gdalinfo ./LC81790212015146LGN00_sr_band1.tif Driver: GTiff/GeoTIFF Files: ./LC81790212015146LGN00_sr_band1.tif GDAL output in WKT for Size is 8191, 8271 Coordinate System is: Landsat 8 Moscow scene PROJCS["WGS 84 / UTM zone 37N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]], previous AUTHORITY["EPSG","6326"]], don’t worry due to font size PRIMEM["Greenwich",0], lesson UNIT["degree",0.0174532925199433], – we are looking closer on it AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], just in several slides PARAMETER["central_meridian",39], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1,AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","32637"]] Origin = (224385.000000000000000,6322515.000000000000000) Pixel Size = (30.000000000000000,-30.000000000000000) Metadata: AREA_OR_POINT=Area http://www.geoapi.org/3.0/javadoc/org/o Band_1=band 1 surface reflectance pengis/referencing/doc-files/WKT.html Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 224385.000, 6322515.000) ( 34d27'55.58"E, 56d57'49.93"N) Lower Left ( 224385.000, 6074385.000) ( 34d43' 3.37"E, 54d44'27.51"N) Upper Right ( 470115.000, 6322515.000) ( 38d30'26.82"E, 57d 2'42.39"N) Lower Right ( 470115.000, 6074385.000) ( 38d32' 5.80"E, 54d48'56.61"N) Center ( 347250.000, 6198450.000) ( 36d33'23.03"E, 55d54'25.94"N) Band 1 Block=8191x1 Type=Int16, ColorInterp=Gray Description = band 1 surface reflectance
15 GDAL metadata for GeoTIFF In this case GeoTIFF contains 1 band (raster), cell data type is 16-bit int. GeoTIFF is very popular for satellite data (along with HDF) Origin = (224385.000000000000000,6322515.000000000000000) Pixel Size = (30.000000000000000,-30.000000000000000) Metadata: AREA_OR_POINT=Area Band_1=band 1 surface reflectance Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 224385.000, 6322515.000) ( 34d27'55.58"E, 56d57'49.93"N) Lower Left ( 224385.000, 6074385.000) ( 34d43' 3.37"E, 54d44'27.51"N) Upper Right ( 470115.000, 6322515.000) ( 38d30'26.82"E, 57d 2'42.39"N) Lower Right ( 470115.000, 6074385.000) ( 38d32' 5.80"E, 54d48'56.61"N) Center ( 347250.000, 6198450.000) ( 36d33'23.03"E, 55d54'25.94"N) Band 1 Block=8191x1 Type=Int16, ColorInterp=Gray Description = band 1 surface reflectance
16 NetCDF (1) Stores multidimensional arrays http://www.narccap.ucar.edu/users/user-meeting-08/handout/netcdf-diagram.png
17 NetCDF (2) Stores multidimensional arrays https://trac.osgeo.org/gdal/raw- attachment/wiki/ADAGUC/ADAGUC_NetCDF_dimension_scales.jpg
18 NetCDF metadata for CSFR climate reanalysis Several lines were cut out due to space constraints netcdf file:/d:/RS_DATA /…/ wnd10m.gdas.201210.grib2 { dimensions: time = 745; lat = 880; lon = 1760; height_above_ground = 1; variables: float U-component_of_wind(time=745,height_above_ground=1, lat=880, lon=1760); :units = "m s-1"; :long_name = "U-component_of_wind @ height_above_ground"; :missing_value = NaNf; // float :GRIB_param_discipline = "Meteorological_products"; :GRIB_param_category = "Momentum"; :GRIB_generating_process_type = "Forecast"; :GRIB_product_definition_template = 0; // int :GRIB_product_definition_template_desc = "Analysis………/ layer at a point in time"; :GRIB_level_type_name = "height_above_ground";
19 NetCDF metadata https://badc.nerc.ac.uk/help/formats/netcdf/netcdf_fig1.gif
20 ISO 19123 Model See paper in main readings…
21 CF-CDM Model (netCDF) See paper in main readings…
22 HDF: now NetCDF-Java reads HDF Main feature: hierarchical variable namespace Includes groups and variables HDF-EOS is the primary format for storing EOS satellite data EOS stands for Earth Observing System
23 Subsetting data: point 1. Define coordinates (lat, lon), e.g. in EPSG:4326
24 Subsetting data: polygon Quite tricky: usually rasterize the polygon to the grid resolution
25 Main readings • • •
26 Additional readings
27 Practical lesson 03 Subset GeoTIFF, HDF, NetCDF with Java libraries Tools: To feel data : HDF Viewer, Weather and Climate Toolkit (WCT) Java libraries: GDAL, GeoTools, NetCDF-Java Readings: • http://www.unidata.ucar.edu/software/thredds/current/netcdf- java/tutorial/GridDatatype.html • http://www.smartjava.org/content/access-information-geotiff-using-java • http://gis.stackexchange.com/questions/73210/how-to-crop-an-image-based- on-a-shapefile-using-geotools • http://docs.geotools.org/stable/tutorials/raster/image.html
28 Practical lesson 03 Feel: play with subsetting NetCDF multidimensional array
29 Practical lesson 03 Feel: browse HDF matrix
Recommend
More recommend