map-converter v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
map-converter is a tool designed to convert the format of topographic files. Currently, it supports IGN ASCII files as input and converts them to NetCDF and GDR formats.
Usage¶
map-converter [OPTIONS] file
Options¶
Option |
Description |
|---|---|
|
Display help and exit. |
|
Invert the topography (multiply by |
|
Apply a scaling factor to the topography (GDR format only). |
|
Set the mask value for the topography. |
|
Convert Cartesian coordinates to spherical coordinates using the provided PROJ.4 string. |
|
Set the root name for the output file(s). |
|
Set the variable name for the output. |
Deprecated Options¶
Warning: These options are deprecated and may not be supported in future versions.
Option |
Description |
|---|---|
|
Path to the bathymetry file. |
|
Path to the polygon file to limit the conversion area. |
|
Input format (no longer required). |
|
Output format (no longer required). |
Examples¶
Basic Conversion¶
Convert an IGN ASCII file to NetCDF:
map-converter input.xyz -o output
Invert Topography¶
Invert the topography values (multiply by -1):
map-converter input.xyz -inverse -o output
Apply Scaling Factor¶
Apply a scaling factor of 10.0 to the topography (GDR format):
map-converter input.xyz -scale 10.0 -o output
Set Mask Value¶
Set a custom mask value (e.g., 9999.0):
map-converter input.xyz -mask 9999.0 -o output
Convert Cartesian to Spherical Coordinates¶
Convert Cartesian coordinates to spherical using a PROJ.4 string:
map-converter input.xyz --proj="+proj=longlat +datum=WGS84" -o output
Set Variable Name¶
Set a custom variable name (e.g., elevation):
map-converter input.xyz -v elevation -o output
Full Conversion Example¶
Convert an IGN ASCII file to NetCDF with inverted topography, scaling, and a custom variable name:
map-converter input.xyz -inverse -scale 10.0 -v elevation --proj="+proj=longlat +datum=WGS84" -o output
Environment Variables¶
map-converter does not rely on specific environment variables. However, if you are using PROJ.4 for coordinate transformations, ensure that the PROJ_LIB environment variable is set correctly to locate PROJ.4 data files.
Notes¶
Input File Format:
Currently, only IGN ASCII files are supported as input.
Output Formats:
The tool generates NetCDF and GDR files by default.
The output file name is constructed using the root name provided with
-o.
Mask Handling:
The
-maskoption allows you to define a value that represents missing or invalid data in the input file.
Coordinate Conversion:
Use
--projto convert Cartesian coordinates to spherical coordinates. The PROJ.4 string must be valid.
Topography Inversion:
The
-inverseor-invoption is useful for converting between elevation and depth (bathymetry).
Scaling:
The
-scaleoption is only applicable for GDR output format.
See Also¶
PROJ.4 Documentation (for coordinate transformations)
NetCDF Format (for output file specifications)