A password will be e-mailed to you.

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.

Pages: [1] 2 3
Author Topic: Creation of bathmmetry data
Burkhard
Professional
Posts: 176
Send Message
Post Creation of bathmmetry data
on: April 26, 2012, 03:40

Is it possible to create bathymmertry data using the resampler that is in the 1.3 SDK.

It is easy to see that it contains a layer=bathymetry option. I have data in a binary format, just 16bit signed integers, and try the following inf file:

==================================
[Destination]
DestDir ="."
DestBaseFileName = "Naples"
LOD=7
NorthLat = 42.1875
SouthLat = 39.375
WestLong = 11.25
EastLong = 15.00

[Source]
Type = ElevS16LSB
SourceDir ="."
SourceFile = "Naples.nc"
Layer=Bathymetry
PixellsPoint=1
ulxmap = 11.25
ulymap = 42.1875
xdim = 0.008333333333
ydim = 0.008333333333
ncols = 450
nrows = 388
ScaleinMeters = 1.0

==================================

resample does something, finds it has to generate 16 cells, takes about 10 minutes to process them, claims to be sucessfull, but then no bgl gets created.

Orswell
Lockheed Martin
Posts: 50
Send Message
Orswell
Post Re: Creation of bathmmetry data
on: April 29, 2012, 20:48

Hi Burkhard, I'll tell you I have never worked with a .nc type binary file and resample before. The "SourceDir="." have you tried making that a path to your folder like "C:\batyhmetry? Have you tried running the bathymetry through resample as "Layer=Elevation?" I'll see if I can make a .nc type file in the meantime.

Burkhard
Professional
Posts: 176
Send Message
Post Re: Creation of bathmmetry data
on: April 30, 2012, 09:24

I have a small file here, just 140KB, can I send it you?

Yes I tried the folders, and when I mistype it finds no file, so it reads it somehow. I have the data in ASCI or in binary format. I will give the elevation a trial.

hanks for answering.

Orswell
Lockheed Martin
Posts: 50
Send Message
Orswell
Post Re: Creation of bathmmetry data
on: May 3, 2012, 11:49

Did Elevation work? What tools are you using to create your elevation data?

Burkhard
Professional
Posts: 176
Send Message
Post Re: Creation of bathmmetry data
on: May 4, 2012, 03:37

Sorry, no the result was the same. I tried several tools now.
http://www.geomapapp.org/MSInstall.html allows an export as Geotiff, but resample doesn't like their geotiffs, neither as image nor as grid.
Since they offer so many data, a documented way to create bathymmetry from their output might be a great gift to the community.

The nc I made using Gridviewer from http://www.gebco.net/ They have a global 30" data set, quite handy only 2GB, which could do as base for most purposes.

Orswell
Lockheed Martin
Posts: 50
Send Message
Orswell
Post Re: Creation of bathmmetry data
on: May 7, 2012, 21:02

Thanks for the link to geomapapp, i'll try and look at some of their data. When you say "resample doesn't like their geotiffs" what do you mean, do you get an error or any message? My first guess is they could be tiled geotiff,or possibly not in the correct coordinate system, but resample will tell you in those cases.

I think the bathymetry tutorial is a great idea!

Burkhard
Professional
Posts: 176
Send Message
Post Re: Creation of bathmmetry data
on: May 8, 2012, 09:35

"GeoTIFF: Only geografic coordinates are supported"
Unable to open data source...

If it would be necessary to convert the files with another app that would be no problem, I tried with MapWindows but also had no success yet.

rhumbaflap-
py
New User
Posts: 21
Send Message
Post Re: Creation of bathmmetry data
on: May 12, 2012, 13:53

Hi Burkhard.

I used gdal_translate to make a geotiff that woked for me.

gdal_translate -a_srs EPSG:4326 -of GTiff gebco_08_-85_17_-72_24.nc gebco_08_-85_17_-72_24.tif

-a_srs EPSG:4326 identifies the source datum and projection as WGS84 geodetic

-of GTiff sets the output as GeoTiff

gebco_08_-85_17_-72_24.nc is the source file

gebco_08_-85_17_-72_24.tif is my GeoTiff

The INF:

[Destination]
DestDir ="."
DestBaseFileName = "CubanWaters"
LOD=7

[Source]
Type = GeoTiff
SourceDir ="."
SourceFile = "gebco_08_-85_17_-72_24.tif"
Layer=Bathymetry

This produces a bgl that looks right. gdal_translate is available in FWTools or part of the OSGeo4W package ( which I prefer ).

Dick

rhumbaflap-
py
New User
Posts: 21
Send Message
Post Re: Creation of bathmmetry data
on: May 12, 2012, 14:21

Hi again.

The .nc format includes header data so SkipBytes is needed. ( and probably other things needed ). Just converting to GeoTiff is a lot easier, and lets gdal deal with the conversion.

gdal_translate -a_srs EPSG:4326 -of GTiff Naples.nc Naples.tif

Dick

rhumbaflap-
py
New User
Posts: 21
Send Message
Post Re: Creation of bathmmetry data
on: May 13, 2012, 10:35

Again,

I found this to apparently work:

[Destination]
	LOD = 7
	DestDir = "."
	DestBaseFileName = "NC_01"
	UseSourceDimensions = 1
	FractionBits = 0
	BaseValue = 0

[Source]
	Layer = Bathymetry
	Type = ElevS16MSB
	SourceDir = "."
	SourceFile = "gebco_08_-85_17_-72_24.nc"
	Lat = 24.4708333
	Lon = -85.4708333
	NumOfCellsPerLine = 1574
	NumOfLines = 790
	CellXdimensionDeg = 0.0083333333333333
	CellYdimensionDeg = 0.0083333333333333
	FractionBits = 0
	BaseValue = 0
	SkipBytes = 612

SkipBytes gets rid if the embedded header code. Your SkipBytes may need to be different??? Type = ElevS16MSB MSB formatting of the data.

Dick

Burkhard
Professional
Posts: 176
Send Message
Post Re: Creation of bathmmetry data
on: May 14, 2012, 04:29

Thank you so much, I now get a bgl as output. Now have to check if the result makes any sense. The Skipbytes was a great help, and can it be that the name of the destination file may not be the name of the source file ( they would have different extensions)?

Burkhard
Professional
Posts: 176
Send Message
Post Re: Creation of bathmmetry data
on: May 14, 2012, 05:09

Not yet really successfull. Using the full GEBPCO_08.NC file, which is documented.. and the following inf file:
==================================
[Destination]
DestDir ="E:\"
DestBaseFileName = "0602_bath"
LOD=7
FractionBits = 0
BaseValue = 0
NorthLat=45.0
SouthLat=22.5
WestLon=0.0
EastLon=30.0

[Source]
Type = ElevS16MSB
SourceDir ="."
SourceFile = "gebco_08.nc"
Layer=Bathymetry
Lon=-179.9958333333333
Lat=89.99583333333
CellXdimensionDeg = 0.0083333333333333
CellYdimensionDeg = 0.0083333333333333
NumOfCellsPerLine = 43200
NumOfLines = 21600
FractionBits = 0
BaseValue = 0
SkipBytes = 612
==================================

I get a 29MB bgl file. No matter where I place it, I only can dive down to 18 feet where it should be thousand meters, with very tiny changes when travelling a longer distance. Will experiment more...

rhumbaflap-
py
New User
Posts: 21
Send Message
Post Re: Creation of bathmmetry data
on: May 14, 2012, 15:43

Hi BurkHard.

What is the LOD of the default P3d bathymetry?

Dick

Burkhard
Professional
Posts: 176
Send Message
Post Re: Creation of bathmmetry data
on: May 15, 2012, 07:50

Also though of that, so I just remove the default files by renaming them to .passive and made a world wide LOD=6 files, but still the same effect, 16-20 feet water debth.
Without my files, it is the same, so it looks it is not possible for some reason to dive outside the supplied US region.

The world file, according to the SDK manual, is ETOPO_Marianna.bgl, which contains a high resolution in the Marianna trench and a low one elsewhere.

The simple
==================================
[Destination]
DestDir ="."
DestBaseFileName = "0602_bath"
LOD=6
UseSourceDimensions = 1
FractionBits = 0
BaseValue = 0

[Source]
Type = ElevS16MSB
SourceDir ="."
SourceFile = "gebco_08.nc"
Layer=Bathymetry
Lon=-179.9958333333333
Lat=89.99583333333
CellXdimensionDeg = 0.0083333333333333
CellYdimensionDeg = 0.0083333333333333
NumOfCellsPerLine = 43200
NumOfLines = 21600
FractionBits = 0
BaseValue = 0
SkipBytes = 612
==================================
generates a 700MB file, all output looks well, when I look at it with TMFviewer it looks resonable, just I cannot dive yet. Hope to have a bit of time for it again next weekend...

rhumbaflap-
py
New User
Posts: 21
Send Message
Post Re: Creation of bathmmetry data
on: May 15, 2012, 10:27

Hi Burkhard.

It does seem we're missing a part of the solution. A little help from Lockheed-Martin might be needed here.

I wonder if we need to mask or null out the positive land data?

Dick

Pages: [1] 2 3
Mingle Forum by cartpauj
Version: 1.0.31 ; Page loaded in: 0.155 seconds.