Skip to content

Commit

Permalink
Update OGR CRS and CoordinateTransformation tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Apr 12, 2019
1 parent 4660e97 commit 2bfb282
Show file tree
Hide file tree
Showing 10 changed files with 314 additions and 107 deletions.
2 changes: 1 addition & 1 deletion autotest/osr/osr_epsg.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def test_osr_epsg_13():

# Two matches (and test GEOGCS)
# This will now match with 4126 (which is deprecated), since the datum
# is identified to 6126 and GetEPSGGeogCS has logic to substract 2000 to it.
# is identified to 6126 and GetEPSGGeogCS has logic to subtract 2000 to it.
#sr.SetFromUserInput("""GEOGCS["myLKS94",
#DATUM["Lithuania_1994_ETRS89",
# SPHEROID["GRS 1980",6378137,298.257222101],
Expand Down
6 changes: 4 additions & 2 deletions gdal/apps/gdal_utilities.dox
Original file line number Diff line number Diff line change
Expand Up @@ -1414,8 +1414,10 @@ The coordinate systems that can be passed are anything supported by the
OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes
(i.e. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prj file
containing well known text.</dd>
<dt> <b>-ct</b> <em>proj_string</em>:</dt><dd> (GDAL &gt;= 2.5)
PROJ string overriding the default
<dt> <b>-ct</b> <em>string</em>:</dt><dd> (GDAL &gt;= 2.5)
A PROJ string (single step operation or multiple step string
starting with +proj=pipeline), a WKT2 string describing a CoordinateOperation,
or a urn:ogc:def:coordinateOperation:EPSG::XXXX URN overriding the default
transformation from the source to the target CRS. It must take into account the
axis order of the source and target CRS.</dd>
<dt> <b>-to</b> <em>NAME=VALUE</em>:</dt><dd> set a transformer option suitable
Expand Down
8 changes: 5 additions & 3 deletions gdal/apps/gdalwarp_bin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ image reprojection and warping utility
\verbatim
gdalwarp [--help-general] [--formats]
[-s_srs srs_def] [-t_srs srs_def] [-ct proj_string] [-to "NAME=VALUE"]* [-novshiftgrid]
[-s_srs srs_def] [-t_srs srs_def] [-ct string] [-to "NAME=VALUE"]* [-novshiftgrid]
[-order n | -tps | -rpc | -geoloc] [-et err_threshold]
[-refine_gcps tolerance [minimum_gcps]]
[-te xmin ymin xmax ymax] [-te_srs srs_def]
Expand Down Expand Up @@ -94,8 +94,10 @@ containing well known text. Starting with GDAL 2.2, if the SRS has an explicit
vertical datum that points to a PROJ.4 geoidgrids, and the input dataset is a
single band dataset, a vertical correction will be applied to the values of the
dataset.</dd>
<dt> <b>-ct</b> <em>proj_string</em>:</dt><dd> (GDAL &gt;= 2.5)
PROJ string overriding the default
<dt> <b>-ct</b> <em>string</em>:</dt><dd> (GDAL &gt;= 2.5)
A PROJ string (single step operation or multiple step string
starting with +proj=pipeline), a WKT2 string describing a CoordinateOperation,
or a urn:ogc:def:coordinateOperation:EPSG::XXXX URN overriding the default
transformation from the source to the target CRS. It must take into account the
axis order of the source and target CRS.</dd>
<dt> <b>-to</b> <em>NAME=VALUE</em>:</dt><dd> set a transformer option suitable
Expand Down
2 changes: 1 addition & 1 deletion gdal/apps/ogr2ogr_bin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void Usage( const char* pszAdditionalMsg = nullptr, bool bShort = true )
" [-progress] [-sql <sql statement>|@filename] [-dialect dialect]\n"
" [-preserve_fid] [-fid FID] [-limit nb_features]\n"
" [-spat xmin ymin xmax ymax] [-spat_srs srs_def] [-geomfield field]\n"
" [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def] [-ct proj_string]\n"
" [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def] [-ct string]\n"
" [-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]\n"
" dst_datasource_name src_datasource_name\n"
" [-lco NAME=VALUE] [-nln name] \n"
Expand Down
8 changes: 5 additions & 3 deletions gdal/apps/ogr_utilities.dox
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update]
[-progress] [-sql <sql statement>|\@filename] [-dialect dialect]
[-preserve_fid] [-fid FID] [-limit nb_features]
[-spat xmin ymin xmax ymax] [-spat_srs srs_def] [-geomfield field]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def] [-ct proj_string]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def] [-ct string]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name]
Expand Down Expand Up @@ -375,8 +375,10 @@ GDAL 2.1</dd>
<dt> <b>-a_srs</b><em> srs_def</em>:</dt><dd> Assign an output SRS</dd>
<dt> <b>-t_srs</b><em> srs_def</em>:</dt><dd> Reproject/transform to this SRS on output</dd>
<dt> <b>-s_srs</b><em> srs_def</em>:</dt><dd> Override source SRS</dd>
<dt> <b>-ct</b> <em>proj_string</em>:</dt><dd> (GDAL &gt;= 2.5)
PROJ string overriding the default
<dt> <b>-ct</b> <em>string</em>:</dt><dd> (GDAL &gt;= 2.5)
A PROJ string (single step operation or multiple step string
starting with +proj=pipeline), a WKT2 string describing a CoordinateOperation,
or a urn:ogc:def:coordinateOperation:EPSG::XXXX URN overriding the default
transformation from the source to the target CRS. It must take into account the
axis order of the source and target CRS.</dd>
<dt> <b>-preserve_fid</b>:</dt><dd>Use the FID of the source features instead of
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogr_proj_p.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Project: GDAL
* Purpose: PROJ-related functionnality
* Purpose: PROJ-related functionality
* Author: Even Rouault <even dot rouault at spatialys dot com>
*
******************************************************************************
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void OCTDestroyCoordinateTransformationOptions(
/** \brief Sets an area of interest.
*
* The west longitude is generally lower than the east longitude, except for
* areas of interest that go accross the anti-meridian.
* areas of interest that go across the anti-meridian.
*
* @param dfWestLongitudeDeg West longitude (in degree). Must be in [-180,180]
* @param dfSouthLatitudeDeg South latitude (in degree). Must be in [-90,90]
Expand Down Expand Up @@ -207,8 +207,8 @@ int OCTCoordinateTransformationOptionsSetAreaOfInterest(
* SRS.
*
* The pipeline may be provided as a PROJ string (single step operation or
* multiple step string starting with +proj=pipeline), or a WKT2 string
* describing a CoordinateOperation.
* multiple step string starting with +proj=pipeline), a WKT2 string describing
* a CoordinateOperation, or a "urn:ogc:def:coordinateOperation:EPSG::XXXX" URN
*
* @param pszCO PROJ or WKT string describing a coordinate operation
* @param bReverseCO Whether the PROJ or WKT string should be evaluated in the reverse path
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/ngw/drv_ngw_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h2>Create copy options</h2>

NextGIS Web supported only GeoTIFF with 3 (RGB) or 4 (RGBA) bangs with datatype
Byte. In CreateCopy function if source dataset has GeoTiff file format it will
copy as is. For other formats the addtional transformation to temporary GeoTiff
copy as is. For other formats the additional transformation to temporary GeoTiff
file will be executed.
<p>
The following copy options are available:
Expand Down
10 changes: 6 additions & 4 deletions gdal/ogr/ogrspatialreference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ void OGRSpatialReference::dumpReadable()
* Note that the returned WKT string should be freed with
* CPLFree() when no longer needed. It is the responsibility of the caller.
*
* The WKT version can be overriden by using the OSR_WKT_FORMAT configuration
* The WKT version can be overridden by using the OSR_WKT_FORMAT configuration
* option. Valid values are the one of the FORMAT option of
* exportToWkt( char ** ppszResult, const char* const* papszOptions ) const
*
Expand Down Expand Up @@ -1259,7 +1259,7 @@ OGRErr OGRSpatialReference::exportToPrettyWkt( char ** ppszResult,
* \brief Convert this SRS into a nicely formatted WKT 1 string for display to a
* person.
*
* The WKT version can be overriden by using the OSR_WKT_FORMAT configuration
* The WKT version can be overridden by using the OSR_WKT_FORMAT configuration
* option. Valid values are the one of the FORMAT option of
* exportToWkt( char ** ppszResult, const char* const* papszOptions ) const
*
Expand Down Expand Up @@ -1291,7 +1291,7 @@ OGRErr CPL_STDCALL OSRExportToPrettyWkt( OGRSpatialReferenceH hSRS, char ** ppsz
* Note that the returned WKT string should be freed with
* CPLFree() when no longer needed. It is the responsibility of the caller.
*
* The WKT version can be overriden by using the OSR_WKT_FORMAT configuration
* The WKT version can be overridden by using the OSR_WKT_FORMAT configuration
* option. Valid values are the one of the FORMAT option of
* exportToWkt( char ** ppszResult, const char* const* papszOptions ) const
*
Expand Down Expand Up @@ -1448,7 +1448,7 @@ OGRErr OGRSpatialReference::exportToWkt( char ** ppszResult,
* Consult also the <a href="wktproblems.html">OGC WKT Coordinate System Issues</a> page
* for implementation details of WKT in OGR.
*
* The WKT version can be overriden by using the OSR_WKT_FORMAT configuration
* The WKT version can be overridden by using the OSR_WKT_FORMAT configuration
* option. Valid values are the one of the FORMAT option of
* exportToWkt( char ** ppszResult, const char* const* papszOptions ) const
*
Expand All @@ -1474,6 +1474,8 @@ OGRErr CPL_STDCALL OSRExportToWkt( OGRSpatialReferenceH hSRS,
* \brief Convert this SRS into WKT format.
*
* This function is the same as OGRSpatialReference::exportToWkt(char ** ppszResult,const char* const* papszOptions ) const
*
* @since GDAL 2.5
*/

OGRErr OSRExportToWktEx( OGRSpatialReferenceH hSRS,
Expand Down
Loading

0 comments on commit 2bfb282

Please sign in to comment.