AIFDR / riab

Risk in a Box - main project
Other
17 stars 6 forks source link

Problems with TM-3 48.2 projection #186

Open uniomni opened 12 years ago

uniomni commented 12 years ago

Trying to upload a geotiff in the projection TM-3 48.2 with risiko-upload gives the error message WMS Record missing for layer [geonode:jakarta_flood_pump_failure] (see stack trace below.

Converting the layer to AAGrid using gdal_translate and uploading gives the error: Error auto-configuring coverage:null (which we have seen before if projections are not right) - see stack trace below

I label this as a third party problem with GeoNode

(riab_env)dhutre@risiko:~/dki_presentation$ risiko-upload jakarta_flood_pump_failure.tif Traceback (most recent call last): File "/home/dhutre/riskinabox/riab_env/bin/risiko-upload", line 7, in execfile(file) File "/home/dhutre/riskinabox/riab/scripts/risiko-upload", line 34, in check_metadata=True) File "/home/dhutre/riskinabox/riab/impact/storage/io.py", line 998, in save_to_geonode ignore=ignore) File "/home/dhutre/riskinabox/riab/impact/storage/io.py", line 958, in save_directory_to_geonode raise RisikoException(msg) impact.storage.io.RisikoException: Filename "dki_presentation/jakarta_flood_pump_failure.tif" could not be uploaded. Error was: WMS Record missing for layer [geonode:jakarta_flood_pump_failure]

(riab_env)dhutre@risiko:~/dki_presentation$ risiko-upload jakarta_flood_pump_failure.asc Traceback (most recent call last): File "/home/dhutre/riskinabox/riab_env/bin/risiko-upload", line 7, in execfile(file) File "/home/dhutre/riskinabox/riab/scripts/risiko-upload", line 34, in check_metadata=True) File "/home/dhutre/riskinabox/riab/impact/storage/io.py", line 1005, in save_to_geonode ignore=ignore) File "/home/dhutre/riskinabox/riab/impact/storage/io.py", line 852, in save_file_to_geonode overwrite=overwrite) File "/home/dhutre/riskinabox/geonode/src/GeoNodePy/geonode/maps/utils.py", line 571, in file_upload new_layer = save(layer, filename, theuser, overwrite, workspace=workspace, keywords=keywords) File "/home/dhutre/riskinabox/geonode/src/GeoNodePy/geonode/maps/utils.py", line 326, in save create_store(name, data, workspace=ws, overwrite=overwrite) File "/home/dhutre/riskinabox/riab_env/src/gsconfig.py/src/geoserver/catalog.py", line 305, in create_coveragestore raise UploadError(response) geoserver.catalog.UploadError: Could not save the layer jakarta_flood_pump_failure, there was an upload error: Error auto-configuring coverage:null

uniomni commented 12 years ago

(riab_env)dhutre@risiko:~/dki_presentation$ gdalinfo jakarta_flood_pump_failure.tif Driver: GTiff/GeoTIFF Files: jakarta_flood_pump_failure.tif jakarta_flood_pump_failure.tif.ovr jakarta_flood_pump_failure.tif.aux.xml Size is 319, 324 Coordinate System is: PROJCS["PCS Name = DGN_1995_Indonesia_TM-3_Zone_48.2", GEOGCS["GCS Name = GCS_DGN_1995|Ellipsoid = WGS_1984|Primem = Greenwich|", DATUM["Datum_Geodesi_Nasional_1995", SPHEROID["WGS 84",6378137,298.2572235629972, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6755"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",106.5], PARAMETER["scale_factor",0.9999], PARAMETER["false_easting",200000], PARAMETER["false_northing",1500000], UNIT["metre",1, AUTHORITY["EPSG","9001"]]] Origin = (220584.858999999996740,827739.976999999955297) Pixel Size = (100.000000000000000,-100.000000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=LZW INTERLEAVE=BAND Corner Coordinates: Upper Left ( 220584.859, 827739.977) (106d41'9.51"E, 6d 4'48.22"S) Lower Left ( 220584.859, 795339.977) (106d41'9.88"E, 6d22'23.05"S) Upper Right ( 252484.859, 827739.977) (106d58'27.01"E, 6d 4'47.59"S) Lower Right ( 252484.859, 795339.977) (106d58'27.96"E, 6d22'22.39"S) Center ( 236534.859, 811539.977) (106d49'48.59"E, 6d13'35.39"S) Band 1 Block=128x128 Type=Float32, ColorInterp=Gray Min=0.000 Max=15.931 Minimum=0.000, Maximum=15.931, Mean=0.973, StdDev=0.936 NoData Value=0 Overviews: 160x162 Metadata: STATISTICS_MINIMUM=0.00030000001424924 STATISTICS_MAXIMUM=15.931200027466 STATISTICS_MEAN=0.97289229923048 STATISTICS_STDDEV=0.93633709149751

uniomni commented 12 years ago

The solution was to reproject with gdal warp: gdalwarp -t_srs EPSG:4326 jakarta_flood_pump_failure.tif jakarta_flood_pump_failure_4326.tif

However, the GeoNode had to be cleaned out before we could upload the layer. This is what was discussed on the mailing list 5-6 months ago and it was decided to not overwrite the metadata. This ticket is an example of a usecase where overwriting the metadata would be desirable.