GenericMappingTools / dcw-gmt

Data and scripts that maintain and build the DCW data used in GMT
GNU Lesser General Public License v3.0
7 stars 2 forks source link

Add Bjørnøya to DCW code SJ #90

Closed anbj closed 5 months ago

anbj commented 2 years ago

Bjørnøya is missing from the dataset and I would like to add it. -- I know, I know - "don't spend time on this dataset". Well, the DCW dataset is so useful, I would like to spend time on it.

So - do I just append a new 'bjørnøya'-segment to SJ.txt, ala

> bjørnøya 0
-8.137269 71.146187
-8.094492 71.147224

?

anbj commented 2 years ago

I think I'll just use the outline from gshhg.

joa-quim commented 2 years ago

Don't know the polygon but I think you shouldn't mix gshhg and DCW polygons. They use different datum.

anbj commented 2 years ago

Okay, thanks @joa-quim.

anbj commented 2 years ago

Do you happen to know which datum?

joa-quim commented 2 years ago

GDHHG is 70ies stuff digitized by CIA so possibly ED50 on many European data. Who knows by now.

anbj commented 2 years ago

ED50 again.. bah. Alright. Not sure what to use then. Thanks @joa-quim.

Esteban82 commented 1 year ago

@anbj can I close this?

anbj commented 1 year ago

Please do. I tried this, got into trouble and never started again. May do it at a later time.

anbj commented 6 months ago

Reopening - ambitions to try this again.

anbj commented 6 months ago

I'm running into the same problem I did the last time.

I've added some 10 new segments to SJ.txt:

> bjornoya 0
19.000000 74.506020
18.997559 74.505394
18.992447 74.505394
18.991104 74.505776
[...]
> bjornoya 1
19.000000 74.367895
19.000015 74.367895
19.001312 74.367498
19.001190 74.366690
19.003632 74.365805
19.003723 74.363302
19.005051 74.362921
19.007584 74.362890
[...]

It builds fine, but when I dump the new code for testing it goes completely haywire. It starts fine, but that it starts to spew out out empty segments ad infinitum::

$ gmt coast -ESJ -M
>  Svalbard and Jan Mayen Segment 0
11.5072777964   79.8658471466
11.5293670311   79.8611136805
11.5150739969   79.8446228954
11.4812904614   79.8429432784
11.449455976    79.8545479049
11.4767426777   79.8629459899
11.5072777964   79.8658471466
>  Svalbard and Jan Mayen Segment 1
11.5605518331   79.8595867559
[...]
-8.21061264385  71.1353506806
-8.16383544083  71.1429853033
-8.16383544083  71.1429853033
-8.13719842245  71.1461918448
>  Svalbard and Jan Mayen Segment 115
>  Svalbard and Jan Mayen Segment 116
>  Svalbard and Jan Mayen Segment 117
>  Svalbard and Jan Mayen Segment 118
>  Svalbard and Jan Mayen Segment 119
>  Svalbard and Jan Mayen Segment 120
>  Svalbard and Jan Mayen Segment 121
>  Svalbard and Jan Mayen Segment 122
>  Svalbard and Jan Mayen Segment 123
>  Svalbard and Jan Mayen Segment 124
>  Svalbard and Jan Mayen Segment 125
>  Svalbard and Jan Mayen Segment 126
>  Svalbard and Jan Mayen Segment 127
>  Svalbard and Jan Mayen Segment 128
>  Svalbard and Jan Mayen Segment 129
>  Svalbard and Jan Mayen Segment 130
>  Svalbard and Jan Mayen Segment 131
>  Svalbard and Jan Mayen Segment 132
>  Svalbard and Jan Mayen Segment 133
>  Svalbard and Jan Mayen Segment 134
>  Svalbard and Jan Mayen Segment 135
[continues forever]

What am I missing?! Are there any requirements of sorting or something like that?

I tried plotting the result, and that actually looks fine. It's just the uncontrolled output of empty segments I don't understand.

joa-quim commented 6 months ago

Don't know. You perhaps use a tool that shows the nc contents to try to find out if the new data was correctly inserted.

anbj commented 6 months ago

Yes, thanks for the tip. I'll just do some trial-and-error.

anbj commented 6 months ago

Tried again, and now it works. Maybe I didn't close the polygons (first point != last point).

anbj commented 5 months ago

Don't know. You perhaps use a tool that shows the nc contents to try to find out if the new data was correctly inserted.

@joa-quim any recommended tool for inspecting nc files? I tried ncview, but looks like this only works with nc files ‘containing grids’.

This is just coordinates making up polygons, right? Don’tunderstand how that works in an nc file.

joa-quim commented 5 months ago

Andreas, I use this old but very nice HDFexplorer Windows program. But there is also the HDFview that being in (shitty) Java should run everywhere.

anbj commented 5 months ago

Thanks! I’ll try those.

anbj commented 5 months ago

Won't touch shitty Java until I absolutely have to. And looks like HDFexplorer requires a purchased license? Will see if there are alternatives.

joa-quim commented 5 months ago

Forgot to mention. The HDFexplorer accepts any login/passwd. At least mine. Far memories tell me that we had to ask a log/pass to the developer. Anyway, it's a small proggy (12 MB zipped). Get it from https://fct-gmt.ualg.pt/lixo/HDF_Explorer.zip

anbj commented 5 months ago

Thanks! Downloaded the zip, and able to run and use the executable within.

anbj commented 5 months ago

@joa-quim Do you know if I'm allowed to use non-ascii in segment headers? E.g. > bjørnøya?

joa-quim commented 5 months ago

I suspect it is not a good idea. Recently I tried to read a file with non-ascii characters and it failed.

anbj commented 5 months ago

Thanks. Better safe than sorry.