go-spatial icon indicating copy to clipboard operation
go-spatial copied to clipboard

unrecognized EPSG code

Open spaceof7 opened this issue 8 years ago • 2 comments

I tried running the BreachDepressions tool on a dem that is in CRS EPSG:2285 (Washington StatePlane North, US feet). I get the following output:

`Reading DEM data... Could not find tag 2062 Filling DEM: 100% Saving DEM data... panic: Unrecognized EPSG code.

goroutine 1 [running]: github.com/jblindsay/go-spatial/geospatialfiles/raster/geotiff.(_GeoTIFF).Write(0xc0820be240, 0xc08200c7d0, 0x46, 0x0, 0x0) /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/geospatialfiles/raster/geotiff/ge otiff.go:326 +0x47a0 github.com/jblindsay/go-spatial/geospatialfiles/raster.(_geotiffRaster).Save(0xc0820be1c0, 0x230c200, 0xc08204faa0) /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/geospatialfiles/raster/geotiffRas ter.go:348 +0x1fd github.com/jblindsay/go-spatial/geospatialfiles/raster.(_Raster).Save(0xc082090090, 0x0, 0x0) /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/geospatialfiles/raster/raster.go: 353 +0x55 github.com/jblindsay/go-spatial/tools.(_BreachDepressions).Run(0xc082008380) /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/tools/breachDepressions.go:849 +0 x252a github.com/jblindsay/go-spatial/tools.(_BreachDepressions).CollectArguments(0xc082008380) /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/tools/breachDepressions.go:256 +0 x12ec github.com/jblindsay/go-spatial/tools.(_PluginToolManager).Run(0x753340, 0xc082006e20, 0x11, 0x0, 0x0) /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/tools/pluginManager.go:96 +0x22f main.init.1.func8() /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/go-spatial.go:211 +0x73 main.main() /Users/johnlindsay/Documents/Programming/GoCode/src/github.com/jblindsay/go-spatial/go-spatial.go:79 +0x657`

If I reproject into UTM 10N (EPSG:26910) The tool runs fine. I also tried reprojecting back in to 2285 to see if there was some error in the original file but that gave me the same error again.

spaceof7 avatar Jul 06 '16 21:07 spaceof7

I get the same error running the BreachDepressions tool with USA_Contiguous_Albers_Equal_Area_Conic_USGS_version (7480). Also tried North_America_Lambert_Conformal_Conic and North_America_Albers_Equal_Area_Conic receiving the same error. Also works for me with UTM.

It seems to run through the entire process and crashes on "Saving DEM data...".

thank you!

samlamont avatar Aug 03 '17 20:08 samlamont

I am getting the same error as the users above by executing "run BreachDepressions" on a DEM with a custom (WRF-Hydro) projected coordinate system. The error message is:

panic: Unrecognized EPSG code.

This occurs during the "Saving DEM data..." step, after all processing is completed. I wonder if these handy tools can be updated to ignore unrecognized EPSG codes? From what I can tell, the go-spatial Breach Depressions tool may be the only available tool allowing the Lindsay (2016) unconstrained breaching (without subsequent pit filling).

Thanks for any guidance you can provide!

kmsampson avatar Oct 29 '19 22:10 kmsampson