Semantic enhancement of Earth Observation data
iTag is a library to tag a footprint with the following information :
- political informations (i.e continents/countries/regions/states)
- geological information (i.e. faults/plates/glaciers/volcanoes)
- hydrological information (i.e. rivers)
- land cover (i.e. forest, water, urban, cultivated, herbaceous, desert, snow, flooded)
- population count
You can access an online instance [here] (http://mapshup.com/projects/itag) as a web service.
See [video capture of itag applied to Pleiades HR and Spot5 images database] (http://vimeo.com/51045597) and access trough [mapshup] (http://mapshup.com/projects/mapshup)
iTag is used by [RESTo - REstful Semantic search Tool for geOspatial] (http://github.com/jjrom/resto)
- PHP (v5.3+) command line
- PostgreSQL (v9.0+) with unaccent extension
- PostGIS (v2.0+)
- GDAL (v1.8+) with python support (for land cover preparation only)
Note: iTag could work with lower version of the specified requirements. However there is no guaranty of success and unwanted result may occured !
We suppose that :
- $ITAG_HOME is the directory containing this file
- $ITAG_DATA is the directory containing the datasources file (see below)
First create the $ITAG_DATA directory
export ITAG_DATA=$ITAG_HOME/data
mkdir $ITAG_DATA
Retrieve coastlines from Natural Earth
cd $ITAG_DATA
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_coastline.zip
unzip ne_10m_coastline.zip
Retrieve countries from Natural Earth
cd $ITAG_DATA
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip
unzip ne_10m_admin_0_countries.zip
Retrieve World Administrative Level 1 data from Natural Earth
cd $ITAG_DATA
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_1_states_provinces.zip
unzip ne_10m_admin_1_states_provinces.zip
Retrieve toponyms from geonames
cd $ITAG_DATA
wget http://download.geonames.org/export/dump/allCountries.zip
wget http://download.geonames.org/export/dump/alternateNames.zip
unzip allCountries.zip
unzip alternateNames.zip
Retrieve geophysical data from Mapping Tectonic Hot Spots
cd $ITAG_DATA
wget http://www.colorado.edu/geography/foote/maps/assign/hotspots/download/hotspots.zip
unzip hotspots.zip
Retrieve glaciers from Natural Earth
cd $ITAG_DATA
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_glaciated_areas.zip
unzip ne_10m_glaciated_areas.zip
Retrieve rivers data from Natural Earth
cd $ITAG_DATA
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_rivers_lake_centerlines.zip
unzip ne_10m_rivers_lake_centerlines.zip
# GEOFLA® 2015 v2.1 (http://professionnels.ign.fr/geofla#tab-3)
cd $ITAG_DATA
wget 'https://wxs-telechargement.ign.fr/oikr5jryiph0iwhw36053ptm/telechargement/inspire/GEOFLA_THEME-COMMUNE_2015_2$GEOFLA_2-1_COMMUNE_SHP_LAMB93_FXX_2015-12-01/file/GEOFLA_2-1_COMMUNE_SHP_LAMB93_FXX_2015-12-01.7z'
wget 'https://wxs-telechargement.ign.fr/oikr5jryiph0iwhw36053ptm/telechargement/inspire/GEOFLA_THEME-COMMUNE_2015_2$GEOFLA_2-1_COMMUNE_SHP_UTM20W84GUAD_D971_2015-12-01/file/GEOFLA_2-1_COMMUNE_SHP_UTM20W84GUAD_D971_2015-12-01.7z'
wget 'https://wxs-telechargement.ign.fr/oikr5jryiph0iwhw36053ptm/telechargement/inspire/GEOFLA_THEME-COMMUNE_2015_2$GEOFLA_2-1_COMMUNE_SHP_UTM20W84MART_D972_2015-12-01/file/GEOFLA_2-1_COMMUNE_SHP_UTM20W84MART_D972_2015-12-01.7z'
wget 'https://wxs-telechargement.ign.fr/oikr5jryiph0iwhw36053ptm/telechargement/inspire/GEOFLA_THEME-COMMUNE_2015_2$GEOFLA_2-1_COMMUNE_SHP_UTM22RGFG95_D973_2015-12-01/file/GEOFLA_2-1_COMMUNE_SHP_UTM22RGFG95_D973_2015-12-01.7z'
wget 'https://wxs-telechargement.ign.fr/oikr5jryiph0iwhw36053ptm/telechargement/inspire/GEOFLA_THEME-COMMUNE_2015_2$GEOFLA_2-1_COMMUNE_SHP_RGR92UTM40S_D974_2015-12-01/file/GEOFLA_2-1_COMMUNE_SHP_RGR92UTM40S_D974_2015-12-01.7z'
wget 'https://wxs-telechargement.ign.fr/oikr5jryiph0iwhw36053ptm/telechargement/inspire/GEOFLA_THEME-COMMUNE_2015_2$GEOFLA_2-1_COMMUNE_SHP_RGM04UTM38S_D976_2015-12-01/file/GEOFLA_2-1_COMMUNE_SHP_RGM04UTM38S_D976_2015-12-01.7z'
p7zip -d GEOFLA_2-1_COMMUNE_SHP_LAMB93_FXX_2015-12-01.7z
p7zip -d GEOFLA_2-1_COMMUNE_SHP_UTM20W84GUAD_D971_2015-12-01.7z
p7zip -d GEOFLA_2-1_COMMUNE_SHP_UTM20W84MART_D972_2015-12-01.7z
p7zip -d GEOFLA_2-1_COMMUNE_SHP_UTM22RGFG95_D973_2015-12-01.7z
p7zip -d GEOFLA_2-1_COMMUNE_SHP_RGR92UTM40S_D974_2015-12-01.7z
p7zip -d GEOFLA_2-1_COMMUNE_SHP_RGM04UTM38S_D976_2015-12-01.7z
# Marine areas
cd $ITAG_DATA
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/physical/ne_10m_geography_marine_polys.zip
unzip ne_10m_geography_marine_polys.zip
# Note : "password" must be the same as
# the value of 'password' parameter in $ITAG_HOME/include/config.php
$ITAG_HOME/_install/installDB.sh -F -d <path_to_postgis_directory> -p password
Note : If you are using Fedora, Red Hat Enterprise Linux, CentOS, scientific Linux, or one of the other distros that enable SELinux by default you should run the following commands as root :
setenforce 0
Run the following commands
# General datasources
$ITAG_HOME/_install/installDatasources.sh -F -D $ITAG_DATA
# Gazetteer
$ITAG_HOME/_install/installGazetteerDB.sh -F -D $ITAG_DATA
# Wikipedia
# This step is optional and can only be performed if you have the geolocated wikipedia data (which probably you don't have :)
# In case of, these are the steps to follow in order to install this database within iTag
#
# Put the geolocated wikipedia data in $ITAG_DATA/wikipedia directory, then run the command
#
$ITAG_HOME/_install/installWikipediaDB.sh -D $ITAG_DATA/wikipedia
<<<<<<< HEAD
# French data sources (from GEOFLA®)
$ITAG_HOME/_install/installFrenchDatasources.sh -F -D $ITAG_DATA
=======
62c8b8c140b0ad73f45f053d03608016184ca178
Install one of GlobCover2009 or GLC2000. GlobCover2009 is more recent and 300 meters resolution. GLC2000 is older and 1 kilometer resolution
Note Process GlobCover2009 would take more time and take more disk space
Download the world glc2000 GeoTIFF file from "Global Land Cover 2000" - global product
Then run the following :
Warning : this PHP script gets postgres superuser password as command line argument, change password after iTag installation !
$ITAG_HOME/_install/computeLandCover.php -p postgres_user_pass -I path_to_glc2000_tif_image
Tip : maybe you have to indicate the location of gdal tools (check -T and -P swich)
Note : depending on your server performance, the landcover computation can take a long time (more than two hours)
Download the world GlobCover 2009 GeoTIFF file from "European Space Agency GlobCover Portal"
Then run the following :
Warning : this PHP script gets postgres superuser password as command line argument, change password after iTag installation !
$ITAG_HOME/_install/computeGlobCover2009.php -p postgres_user_pass -f GLOBCOVER_L4_200901_200912_V2.3.color.tif
Download most recent "Population Count Grid Future" (or "Population Count Grid") product of the whole World from SEDAC in ASCII Grid format (*.ascii or *.asc). All four resolutions (1°, 1/2°, 1/4° and 2.5′) are needed!
Then run the following :
Attention : this PHP script gets postgres superuser password as command line argument, change password after iTag installation !
$ITAG_HOME/_install/installGPW.php -p postgres_user_pass -f glp15ag60.asc
$ITAG_HOME/_install/installGPW.php -p postgres_user_pass -f glp15ag30.asc
$ITAG_HOME/_install/installGPW.php -p postgres_user_pass -f glp15ag15.asc
$ITAG_HOME/_install/installGPW.php -p postgres_user_pass -f glp15ag.asc
Note : this take a loooooong time (more than four hours)
$ITAG_HOME/_install/deploy.sh -s $ITAG_HOME -t $ITAG_TARGET
We suppose that $ITAG_TARGET is accessible to http://localhost/itag/ in Apache.
To tag footprint on Toulouse with geological information and all cities with a pretty GeoJSON output, open this url within you browser
http://localhost/itag/?taggers=Political&_pretty=true&footprint=POLYGON((1.350360%2043.532822,1.350360%2043.668522,1.515350%2043.668522,1.515350%2043.532822,1.350360%2043.532822))
Available parameters for Web service are :
- &taggers=Political,Geology,Hydrology,Landcover
- &pretty=true
You can check this [running instance] (http://mapshup.com/projects/itag/)
Examples :
Tag footprint on Toulouse with political and geological information and with a pretty GeoJSON output
http://mapshup.com/projects/itag/?taggers=Political,Geology&_pretty=true&footprint=POLYGON((1.350360%2043.532822,1.350360%2043.668522,1.515350%2043.668522,1.515350%2043.532822,1.350360%2043.532822))
Tag footprint intersecting France, Italy and Switzerland with political information. Hierarchical result as pretty GeoJSON output
http://mapshup.com/projects/itag/?taggers=Political&footprint=POLYGON((6.487426757812523%2045.76081241294796,6.487426757812523%2046.06798615804025,7.80578613281244%2046.06798615804025,7.80578613281244%2045.76081241294796,6.487426757812523%2045.76081241294796))