#!/usr/bin/perl

# CM ISPA / aout 2014

# programme d'import de donnees dans geoserver via le module rest_curl

use rest_curl;

use strict;
use warnings;


our $user="admin";
our $password="geoserver";
our $URL="http://sdeeph16:8080/geoserver/rest";




# Init

my $curl = WWW::Curl::Easy->new;

my $fileLocal="/home/chmoisy/sdeeph16/Projets/IDS/Programmes/REST/ocs_gip.zip"; # zip
my $fileServer="/home/spatialisation/chmoisy/Projets/IDS/Programmes/REST/ocs_gip.shp"; # shp
my $dirServer="/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/SIG/couches_geographiques/Limites_Pays/";
my $layerName="ocs_gip";



my $IGNdir	= "/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/Donnees_IGN/";
my $STORMdir	= "/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/VIS_NIR/Photos_Aeriennes/Images_aeroportees_fevrier_2009_Tempete/Niveau_3-mosaique/";
my $THRdir	= "/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/VIS_NIR/HR_THR/";
my $VECTORdir	= "/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/SIG/";

# import depuis le serveur ( => external ) des différents types de données

# IGN : BD ORTHO, BD TOPO ?, MNT

# données tempêtes : mosaique CIR et RGB

# THR : kalideos

# LANDSAT : 

# BR/MR : ? 

# vecteur : données de réf : contour pays, sites 




#rest_curl::createWorkspace($URL,$user,$password,$curl,"donnees_IGN");		# OK
#rest_curl::createWorkspace($URL,$user,$password,$curl,"photos_aeriennes");	# OK
#rest_curl::createWorkspace($URL,$user,$password,$curl,"HR_THR");		# OK
#rest_curl::createWorkspace($URL,$user,$password,$curl,"SIG");			# OK



# nouvelle dénomination pour séparer les coverages stores
#rest_curl::createWorkspace($URL,$user,$password,$curl,"donnees_IGN_Scan25_2009");
#rest_curl::createWorkspace($URL,$user,$password,$curl,"photos_aeriennes_tempete_2009");	
#rest_curl::createWorkspace($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5");		
#rest_curl::createWorkspace($URL,$user,$password,$curl,"HR_THR_Kalideos_Pleiades");	
#exit;

# donnees_IGN

# scan25 : imagemosaic ? a tester : ensemble d'images / zip ?  Image mosaic => plugin nécessaire ? 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"donnees_IGN","Scan_25","ecw","server",$IGNdir."/Scan25/Scan25_2009/Lambert2Etendue/Dep_33/SC25_TOPO_0400_2020_L2E.ecw","27572","Scan25_dep33"); 	# OK
# multiples => configure all
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"donnees_IGN_Scan25_2009","Dep33","ecw","server",$IGNdir."/Scan25/Scan25_2009/Lambert2Etendue/Dep_33/SC25_TOPO_0400_2020_L2E.ecw","27572","","all","nativebbox,latlonbbox"); 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"donnees_IGN_Scan25_2009","Dep33","ecw","server",$IGNdir."/Scan25/Scan25_2009/Lambert2Etendue/Dep_33/SC25_TOPO_0400_2000_L2E.ecw","27572","","all","nativebbox,latlonbbox"); 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"donnees_IGN_Scan25_2009","Dep33","ecw","server",$IGNdir."/Scan25/Scan25_2009/Lambert2Etendue/Dep_33/SC25_TOPO_0420_2010_L2E.ecw","27572","","all","nativebbox,latlonbbox"); 		# OK, seul à être visible dans la prévisualisation des couches, disparaît si autre image ajoutée
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"donnees_IGN_Scan25_2009","Dep33","ecw","server",$IGNdir."/Scan25/Scan25_2009/Lambert2Etendue/Dep_33/SC25_TOPO_0410_2000_L2E.ecw","27572","","all","nativebbox,latlonbbox"); 

# Scan25 : image mosaic ?


# séparation : 1 coverage store par coverage 


#exit;

#createCoveragestore($URL,$user,$password,$curl,"donnees_IGN","Scan_25","imagemosaic","server",$IGNdir."/Scan25/Scan25_2009/Lambert2Etendue/Dep_33/SC25_TOPO_0400_2020_L2E.ecw","27572","Scan25_dep33"); 


# Bd Ortho
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"donnees_IGN","BDortho","ecw","server",$IGNdir."/BdOrtho/2012/BDORTHO_2-0_ECW_LAMB93_D033_2012-01-01/BDORTHO/1_DONNEES_LIVRAISON_2013-10-00510/BDO_RVB_0M50_ECW_LAMB93_D33-ED12/33-2012-0450-6435-LA93.ecw","27572","BdOrtho_2012_dep33");  # OK 

# MNT : format .xyz ou .asc : raster ou vecteur ? 

# BD Foret
#rest_curl::createDatastore($URL,$user,$password,$curl,"donnees_IGN","BDforet_V2","Shapefile",$IGNdir."BdForet_V2/BDFORET_2-0_SHP_LAMB93_D033_2014-04-01/BDFORET_2-0/1_DONNEES_LIVRAISON/BDF_2_SHP_LAMB93_33/FORMATION_VEGETALE.shp","server"); # ,"Formation_Vegetale"); # dernier arg utile ? pris en compte ?	# OK 


# tempete_2009 : même image  CIR ? : la derniere inseree semble prendre le dessus : pb du coverage store ? 1 seul fichier raster dedans ?  non plusieurs possibles 
# attention si emprise différente : à déconseiller ?
# si plusieurs => ?configure=all et recalculer l'emprise
# worldimage ? ers ? à tester
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"photos_aeriennes_tempete_2009","Bilos","ecw","server",$STORMdir."/Bilos/orthos_totales_15cm_Bilos_RGB_et_CIR-ECW+ERS/inra_bilos_ortho15cm-totale_rgb_lamb2et.ecw","27572","Bilos_RGB","all","nativebbox,latlonbbox");  	# OK seule
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"photos_aeriennes_tempete_2009","Bilos","ecw","server",$STORMdir."/Bilos/orthos_totales_15cm_Bilos_RGB_et_CIR-ECW+ERS/inra_bilos_ortho15cm-totale_cir_lamb2et.ecw","27572","Bilos_CIR","all","nativebbox,latlonbbox"); 	# NOK si importee apres
# NOK : même coverage store
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"photos_aeriennes_tempete_2009","Bilos_RGB","ecw","server",$STORMdir."/Bilos/orthos_totales_15cm_Bilos_RGB_et_CIR-ECW+ERS/inra_bilos_ortho15cm-totale_rgb_lamb2et.ecw","27572","","all","nativebbox,latlonbbox");  	# OK 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"photos_aeriennes_tempete_2009","Bilos_CIR","ecw","server",$STORMdir."/Bilos/orthos_totales_15cm_Bilos_RGB_et_CIR-ECW+ERS/inra_bilos_ortho15cm-totale_cir_lamb2et.ecw","27572","","all","nativebbox,latlonbbox"); 	# OK
# OK si 2 coverage store différents  : 1 coverage store par mosaique
# si images séparés : imagemosaic ? cf scan25

# NOK : erreur nom : args passés comme nom : , au lieu de ? 
# pb avec 2 partie de create coverage store : configuration 


#exit;

my $LocalDir="/data/Projets/IDS/Donnees/DIMAP";

# F2  : non coregistre ? 

#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos","Formosat2_pan1a_2013_-07-22-2_local_src","geotiff","local",$LocalDir."/imagery.tif","","Formosat2_pan1a_2013_-07-22-2_src","all","nativebbox,latlonbbox"); 	# NOK :Could not aquire reader for coverage. 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos","Formosat2_pan1a_2013_-07-22-2_local_epsg4326","geotiff","local",$LocalDir."/f2_wgs84.tif","","Formosat2_pan1a_2013_-07-22-2_epsg4326","all","nativebbox,latlonbbox");	# OK
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos","Formosat2_pan1a_2013_-07-22-2_local_same_srs","geotiff","local",$LocalDir."/f2_same_srs.tif","","Formosat2_pan1a_2013_-07-22-2_same_srs","all","nativebbox,latlonbbox");	# OK

# Spot 5
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5","Spot5_N3_2009_06_02_ter","envihdr","server",$THRdir."/Aquitaine/Spot/Spot5/2009/2009-06-02/Kalideos-j_n3-1.0-imag-orth-2/s5_20090602_j.ort1","","s5_20090602_j_ort1","all","nativebbox,latlonbbox","ENABLE"); 	# NOK ?? nom de la couche modifié donc non activable  => a activer avec bon SRS ? créé mais nom = s5_20090602_j   => pb car plusieurs couches    : pb avec les options ?

# test pour nom sans les autres args : 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5","Spot5_N3_2009_06_02_ter","envihdr","server",$THRdir."/Aquitaine/Spot/Spot5/2009/2009-06-02/Kalideos-j_n3-1.0-imag-orth-2/s5_20090602_j.ort1","27572","s5_20090602_j_ort1","","","ENABLE"); 	
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5","Spot5_N3_2009_06_02_ter","envihdr","server",$THRdir."/Aquitaine/Spot/Spot5/2009/2009-06-02/Kalideos-j_n3-1.0-imag-orth-2/s5_20090602_j.ort2","27572","s5_20090602_j_ort2","","","ENABLE");
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5","Spot5_N3_2009_06_02_ter","envihdr","server",$THRdir."/Aquitaine/Spot/Spot5/2009/2009-06-02/Kalideos-j_n3-1.0-imag-orth-2/s5_20090602_j.ort3","27572","s5_20090602_j_ort3","","","ENABLE");
# idem : seul une couche sert de référence 

# test en séparant : OK , rem : le titre est différent : s5_20090602_j pour tous 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5","Spot5_N3_2009_06_02_N3_ort1","envihdr","server",$THRdir."/Aquitaine/Spot/Spot5/2009/2009-06-02/Kalideos-j_n3-1.0-imag-orth-2/s5_20090602_j.ort1","27572","s5_20090602_N3_j_ort1","","","ENABLE"); 	# OK
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5","Spot5_N3_2009_06_02_N3_ort2","envihdr","server",$THRdir."/Aquitaine/Spot/Spot5/2009/2009-06-02/Kalideos-j_n3-1.0-imag-orth-2/s5_20090602_j.ort2","27572","s5_20090602_N3_j_ort2","","","ENABLE"); 	# OK
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Spot5","Spot5_N3_2009_06_02_N3_ort3","envihdr","server",$THRdir."/Aquitaine/Spot/Spot5/2009/2009-06-02/Kalideos-j_n3-1.0-imag-orth-2/s5_20090602_j.ort3","27572","s5_20090602_N3_j_ort3","","","ENABLE"); 	# OK


# Pleiades : 
rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos_Pleiades","Pleiades_Saint_Emilion_20130903_MS","jp2ecw","server",$THRdir."/Aquitaine/Pleiades/SAINT-EMILION_PLEIADES_20130903_FCGC600072770/IMG_PHR1B_MS_002/IMG_PHR1B_MS_201309031108175_SEN_668930101-002_R1C1.JP2","","Pleiades_Saint_Emilion_20130903_MS","","","ENABLE"); # fichier .JP2 : OK


# fichier non géoréférencé : pas d'activation possible : activee par defaut  ? : pas de SRS : SRS particulier
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR","Cancon","envihdr","server",$THRdir."/Aquitaine/Cancon_Spot-Landsat/1992/1992-09-17/cancon_xs3.im","","cancon_xs3","","",""); #  OK

# erdas : activee par defaut  ? : pas de SRS : SRS particulier : EPSG:404000 : 2D wildcard coordinate reference system in meters
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR","Vosges_AAO","erdasimg","server",$THRdir."/France/VOSGES/Spot-XS_2-Erdas-Vosges-1986/VO860AAO.IMG","","Vosges_1986","","",""); # OK

# THR	: NOK :   Could not aquire reader for coverage  		aussi même problème que pour photos_tempête  : même coverage_store => 1 seule vignette ?
# même problème via l'interface pour geotiff : DIMAP ne passe pas 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos","Formosat2_pan1a_2013_-07-22-2","geotiff","server",$THRdir."/Aquitaine/Formosat2/2013-07-22-2/pan_1a/1.0/imagery.tif","27572","Formosat2_pan1a_2013_-07-22-2","all","nativebbox,latlonbbox"); 	# NOK :Could not aquire reader for coverage. 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos","Formosat2_pan1a_2013_-07-22","geotiff","server",$THRdir."/Aquitaine/Formosat2/2013-07-22/pan_1a/1.0/imagery.tif","27572","Formosat2_pan1a_2013_-07-22","all","nativebbox,latlonbbox"); 	# NOK :Could not aquire reader for coverage. 
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos","Formosat2_ms1a_2013_-07-22","geotiff","server",$THRdir."/Aquitaine/Formosat2/2013-07-22/ms_1a/1.0/imagery.tif","27572","Formosat2_ms1a_2013_-07-22","all","nativebbox,latlonbbox"); 	# NOK :Could not aquire reader for coverage.  / No such coverage: HR_THR,Kalideos,Formosat2_pan1a_2013_-07-22



# test worldimage : .tfw ? non utiliser le .tif
#rest_curl::createCoveragestore($URL,$user,$password,$curl,"HR_THR_Kalideos","Photo_Aeriennes_Biscarosse_2000","worldimage","server",$THRdir."../Photos_Aeriennes/photo_aeriennes_1997-2000/rectifiees/Biscarosse-2000/1_10000/bisc1001rec.tif","","Biscarosse_2000","",""); # OK

exit;

# SIG	: NOK
#rest_curl::createDatastore($URL,$user,$password,$curl,"SIG","OCS","Shapefile",$VECTORdir."/couches_geographiques/OCS/GIP Littoral - 2002-2009/OCS_00_09/ocs_00_09.shp","server"); # ,$layerName."_server"); # OK 
#rest_curl::createDatastore($URL,$user,$password,$curl,"SIG","Limites_Pays","Shapefile",$VECTORdir."/couches_geographiques/Limites_Pays/limites_continentales_utf8_wgs84.shp","server"); # ,$layerName."_server");  # OK
#rest_curl::createDatastore($URL,$user,$password,$curl,"SIG","Modis_Sinusoidal","Shapefile",$VECTORdir."/couches_geographiques/modis_sinusoidal/modis_sinusoidal_grid_world.shp","server"); # ,$layerName."_server");   # NOK erreur : pb SRS ? 


#createDatastore($curl,"test_curl","test_postgis_curl_2","PostGis");	 # OK
#createDatastore($curl,"test_curl","test_shapefile_curl_local","Shapefile",$fileLocal,"local",$layerName."_local");  # OK
#createDatastore($curl,"test_curl","test_shapefile_curl_remote","Shapefile",$fileServer,"server",$layerName."_server"); # OK
#createDatastore($curl,"test_curl","test_shapefile_directory_curl","ShapefileDirectory",$dirServer); # OK ajout : mais pb openlayers ? recalcul emprise a faire

# a modifier / completer : 
#updateFeatureType($curl,"test_curl","test_shapefile_directory_curl"); #  recalcul emprise  : en attente option ? OK passage avec XML, prise en compte ? OK avec enabled a true







exit; 
#

# GDAL  ?	geotiff, nitf, aig, dted, jp2ecw, ehdr, erdasimg, rpftoc, ecw, rst, gtopo30, arcgrid, imagemosaic, envihdr, worldimage

my $tifImgLocal="/data/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/VIS_NIR/HR_THR/Aquitaine/Landsat/1987-1988/1987-08-20_1988-09-07/reprojetees_Lambert3_Tiff/870820AAB.tif";
my $tifImgZipLocal="/data/Projets/IDS/Donnees/880907AAB.zip";
my $tifImgZipLocal2="/data/Projets/IDS/Donnees/s5_20060606_thx_dalle.zip";

my $worldImgLocal="/data/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/VIS_NIR/HR_THR/Aquitaine/Landsat//N2_Cesbio/L930362/2010/20100524/ORTHO_SURF_CORR_PENTE/L930362_20100524_L5_199_030_USGS_surf_pente_30m.B10"; # autre format : ENVI => manque header 
my $worldImgZipLocal="/data/Projets/IDS/Donnees/L930362_20100524_L5_199_030_USGS_surf_pente_30m.zip"; # autre format : ENVI : zippé avec header 

my $mosaicImgLocal="/data/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/Micro_Ondes/SMOS/MIR_RE02/MIR_CLF31A/2010/SM_RE02_MIR_CLF31A_20101223T000000_20101223T235959_272_001_7.DBL.nc"; # netcdf
my $mosaicImgZipLocal="/data/Projets/IDS/Donnees/SM_RE02_MIR_CLF31A_20101223T000000_20101223T235959_272_001_7.DBL.nc.zip";

my $tifImgSrv="/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/VIS_NIR/HR_THR/Aquitaine/Landsat/1987-1988/1987-08-20_1988-09-07/reprojetees_Lambert3_Tiff/870820AAB.tif";
my $worldImgSrv="/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/VIS_NIR/HR_THR/Aquitaine/Landsat//N2_Cesbio/L930362/2010/20100524/ORTHO_SURF_CORR_PENTE/L930362_20100524_L5_199_030_USGS_surf_pente_30m.B10";
my $mosaicImgSrv="/donnees/baieStockage/Nouvelle_Structure/Donnees_Sources/Teledetection/Micro_Ondes/SMOS/MIR_RE02/MIR_CLF31A/2010/SM_RE02_MIR_CLF31A_20101223T000000_20101223T235959_272_001_7.DBL.nc"; # netcdf;

# a tester :

# LOCAL
#createCoveragestore($curl,"test_curl","test_coverage_store_geotiff","geotiff","local",$tifImgZipLocal); # OK

#createCoveragestore($curl,"test_curl","test_coverage_store_geotiff","geotiff","local",$tifImgZipLocal2); #   

#createCoveragestore($curl,"test_curl","test_coverage_store_geotiff","geotiff","local",$tifImgLocal); # IJ

#  Err 500 : Could not aquire reader for coverage. : fichier vide provoque la même erreur
 #createCoveragestore($curl,"test_curl","test_coverage_store_worldimage","worldimage","local",$worldImgLocal); # Err 500 : Could not aquire reader for coverage. : format non reconnu ?  pb header non envoyé pour format ENVI
#createCoveragestore($curl,"test_curl","test_coverage_store_worldimage","worldimage","local",$worldImgZipLocal); # Err 500 : Error occured unzipping file



# pb unzip : fichier tronqué pendant l'envoi ? non envoyé ? transfert trop court pour que le fichier soit réellement envoyé  ~ 1s transfert
# OK : pour envoyer un zip : CURLOPT_POST a 1 pour utiliser INFILE
#createCoveragestore($curl,"test_curl","test_coverage_store_envihdr","envihdr","local",$worldImgZipLocal,"","test_envoi_envihdr"); # OK



#createCoveragestore($curl,"test_curl","test_coverage_store_imagemosaic","imagemosaic","local",$mosaicImgLocal); # Err 500 : Could not aquire reader for coverage
 # # NOK Failed to access the existing reader to check if it can harvest new files

# createCoveragestore($curl,"test_curl","test_coverage_store_imagemosaic","imagemosaic","local",$mosaicImgZipLocal); # Err 500 : Error occured unzipping file

# test CURL directement ?
# curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip"   --data-binary @/data/Projets/IDS/Donnees/880907AAB.zip   http://147.100.98.16:8080/geoserver/rest/workspaces/test_curl/coveragestores/test_coverage_store_geotiff/file.geotiff		    		=>   		OK donc zip OK  

# curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip"   --data-binary @/data/Projets/IDS/Donnees/L930362_20100524_L5_199_030_USGS_surf_pente_30m.zip   http://147.100.98.16:8080/geoserver/rest/workspaces/test_curl/coveragestores/test_coverage_store_worldimage/file.worldimage		# NOK Could not find appropriate worldimage file in archive
# pb extension ? 


# curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip"   --data-binary @/data/Projets/IDS/Donnees/SM_RE02_MIR_CLF31A_20101223T000000_20101223T235959_272_001_7.DBL.nc.zip   http://147.100.98.16:8080/geoserver/rest/workspaces/test_curl/coveragestores/test_coverage_store_imagemosaic/file.imagemosaic	# HTTP/1.1 400 Bad Request Could not find appropriate imagemosaic file in archive  : nc imagemosaic ?  		/ ?NOK HTTP/1.1 405 Method Not Allowed

# netcdf : ni imagemosaic, ni worldimage
# netcdf reader : en cours de dev ou a compiler manuellement

# worldimage : fichier texte accompagnant une image : ex : .jgw ou .tfw avec .jpg ou .tif

# envi : format particulier ? ENVIHdr ? => envihdr
# curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip"   --data-binary @/data/Projets/IDS/Donnees/L930362_20100524_L5_199_030_USGS_surf_pente_30m.zip   http://147.100.98.16:8080/geoserver/rest/workspaces/test_curl/coveragestores/test_coverage_store_worldimage/file.envihdr => OK

# pb plusieurs fichiers dans zip ? 
# compression avec zip => pb
# test avec 7z a archive.zip fichiers  : idem
# 7z a -tzip archive.zip fichiers

# SERVER
#createCoveragestore($curl,"test_curl","test_coverage_store_geotiff","geotiff","server",$tifImgSrv,"27573","Landsat_1987_1988_bis"); # OK mais couche non activee par defaut => corrige		# OK 

#createCoveragestore($curl,"test_curl","test_coverage_store_worldimage","worldimage","server",$worldImgSrv); # NOK Error while storing uploaded file::no protocol: 
#createCoveragestore($curl,"test_curl","test_coverage_store_imagemosaic","imagemosaic","server",$mosaicImgSrv);# NOK Error while storing uploaded file::no protocol: 


# GDAL : test envi header
createCoveragestore($URL,$curl,"test_curl","test_coverage_store_envihdr","envihdr","server",$worldImgSrv,"27573","L930362_20100524_B10"); # OK 





