Auto UTM zone in the graph file?

Is there a way to specify “auto” UTM zone in the XML graph file and have gpt substitute the appropriate zone for the asset? I can compute the zone myself every time and change the XML file before running GPT, but I’d like to avoid duplicating what the toolbox already can do for me.


I was curious how UTM zone works in case of irregular zones 30V, 31V, 32V, 31X, 33X, 35X, and 37X

Asset S1A_EW_GRDM_1SDH_20160113T143932_20160113T144036_009477_00DBFD_1EDF is right over Svalbard. The result of doing TC on it has the following WKT:

PROJCS[“WGS 84 / TMzn35N”,
SPHEROID[“WGS 84”,6378137,298.257223563,

This WKT has the correct central_meridian, but its name is interesting - EPSG:4037 is defined for Moldova:

This probably makes no practical difference, but I wonder what the standard way of setting WKT for the irregular UTM zones is.

The automatic UTM zone reprojection should work if you specify AUTO:42001 as crs parameter.
In the reprojection dialog you can see that there are three more automatic reprojection codes. Enable Predefined CRS and then click on Select…. In the dialog the codes are listed.

I did AUTO:42001 as crs parameter AUTO:42001 as crs parameter, but it is still
STRING ‘WGS 84 / TMzn36N’
INT 4038

How to change to
INT 4037

If you know the UTM zone then you can use EPSG:32636, otherwise there is no way to change this.
I think the EPSG:4038 and EPSG:32636 projections are technically equal, just the names are different.
I don’t know why the auto-detection thinks the one for Moldova is better. We rely here on a library. Might be that it gets better with the next release.
I’ve noted it, so we will take care of it (SNAP-740).

2 posts were split to a new topic: When do we need Apply-Orbit file

I am trying to automate processing of S1 GRD products using the gpt command line tool.
For this purpose I am using an .xml template that I obtained from SNAP GUI, and with a python script I am modifying the input and output read/write fields and then calling gpt graph.xml on the newly created xml graph.

I tried to generate a template from SNAP, selecting AUTO UTM, but that doesn’t work when I use that graph as a template and change the filename with that of a product that needs to be projected in a different UTM zone (relatively to the product that was in the GUI when I created the graph).
How does the AUTO UTM works? Is it possible to insert a string in the xml graph such that gpt will figure out the correct UTM zone for the given product?
And I mean, manually setting the <mapProjection> field in the graph, not by using the GUI.


have you tried this?

I don’t see any crs parameter field in the xml file… so I don’t understand how I am supposed to set it. (sorry, I am new to SNAP and projections, so I am a bit confused)

Currently this is my Terrain-Correction node in the xml graph:

  <node id="Terrain-Correction">
      <sourceProduct refid="Calibration"/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <demName>SRTM 1Sec HGT</demName>
      <mapProjection>PROJCS[&quot;WGS 84 / Auto UTM&quot;,
      SPHEROID[&quot;WGS84&quot;, 6378137.0, 298.257223563]],
    PRIMEM[&quot;Greenwich&quot;, 0.0],
    UNIT[&quot;degree&quot;, 0.017453292519943295],
    AXIS[&quot;Geodetic longitude&quot;, EAST],
    AXIS[&quot;Geodetic latitude&quot;, NORTH]],
  PARAMETER[&quot;central_meridian&quot;, 3.0],
  PARAMETER[&quot;latitude_of_origin&quot;, 0.0],
  PARAMETER[&quot;scale_factor&quot;, 0.9996],
  PARAMETER[&quot;false_easting&quot;, 500000.0],
  PARAMETER[&quot;false_northing&quot;, 0.0],
  UNIT[&quot;m&quot;, 1.0],
  AXIS[&quot;Easting&quot;, EAST],
  AXIS[&quot;Northing&quot;, NORTH]]</mapProjection>
      <incidenceAngleForSigma0>Use projected local incidence angle from DEM</incidenceAngleForSigma0>
      <incidenceAngleForGamma0>Use projected local incidence angle from DEM</incidenceAngleForGamma0>
      <auxFile>Latest Auxiliary File</auxFile>

This was generated in the SNAP GUI with a belgian tile (UTM zone 31N), now if I take the same graph, change the read and write filenames (with a script, not the GUI) in order to process a tile in another UTM zone, if I run gdalinfo on the processed product I see that it’s in UTM 31N…
What I would like to do is process a batch of files from different UTM zones, and have gpt figure out the correct UTM zone for the projection, without going through the GUI.
Another way to do this would be reading metadata from my GRD product and figure out the correct UTM zone from the geo location, and then automatically substituting the WKT string in the xml graph with a script.
I am trying to understand if it’s possible to achieve this in a simpler manner using AUTO UTM…

it should be sufficient to replace it by