Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Generalizing tiling operations

Aperta
#46 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
shell
Ambito
data, tooling

Direzione di ricerca

Inizia leggendo gmt_data_server e il percorso di caricamento di GMT_Create_Session, quindi traccia gmtlib_file_is_srtmrequest, gmtlib_get_srtmlist e gmtlib_assemble_srtm. Il lavoro sarà completato quando il flusso di tiling sarà specificato per dataset e dimensioni delle tile arbitrari, con una griglia tiles.nc standardizzata e valori predefiniti per lo sfondo; anche la scelta di denominazione dell'oceano deve essere risolta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

These nots are mostly to myself to clarify how I did the tiling blending, but also for GMT contributes to comment on in case I am proposing the wrong path.

Currently, we only offer two tiled data sets: SRTM1s and SRTM3s. THey are not available everywhere (land only) so we also have a tiny srtm_tiles.nc grid that is true/false if a tile exist. Here is how GMT handles a request like gmt grdimage @earth_relief_01s -RFR -JM20c -B -pdf map:

  1. During module initialization (gmt_init_module) we call gmtlib_file_is_srtmrequest. It checks if this is one of the two earth_relief_01|3s files, and if so it sets ocean to true if we gave earth_relief instead of srtm_relief as the name. If not then we are done.
  2. Next, gmtlib_get_srtmlist is called. It builds the list of tile file names needed. To do this it uses the region (-R) rounded outwards to nearest tile size (here 1 degree). It then loops over all the imaginary tiles needed but if the relevant node in the grid srtm_tiles.nc is false we skip it since that tile is not present on the server. If ocean was determined to be true then we also add the file earth_relief_15s as the last file. The listfile is called =srtm##### (random unique ints) and placed in the temp dir. Its path is then used to replace the initial @earth_relief_01|3s file given to the module.
  3. When the grid is accessed by GMT_Read_Data, we recognize the gridname using the gmtlib_file_is_srtmlist function, and if true then we call gmtlib_assemble_srtm which passes the list of tiles to grdblend. The resulting grid is passed back out to the module

All this works fine, but we need to generalize this to work for any dataset with any tile size, etc. This means we must

  1. Use the dataset name (without _xxy) to mean a directory with tiles (instead of special names like srtm1). E.g., if we tiled the 15s grid then inside eart/earth_relief there would be a directory earth_relief_15s and no earth_relief_15s_p.grd file.
  2. Let the tile size be a variable
  3. Standardize the name of the tiles.nc grid
  4. Generalize the notion of a background default grids for areas with no tiles.

I think the information needed to do this simply goes into the gmt_data_server file which is loaded into memory during GMT_Create_Session.

We may also consider not doing the with or without ocean options since that means different input names.

Lingua principale
Shell
Stelle
7
Fork
3
Merge medio
9h 22m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GenericMappingTools/gmtserver-admin

Tutte le issue di GenericMappingTools/gmtserver-admin

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.