Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC 73: Integration of PROJ6 for WKT2, late binding capabilities, time-support and unified CRS database #1185

Merged
merged 1 commit into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 26 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_VERSION: Visual Studio 15
platform: x86
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
VS_VERSION: Visual Studio 14
platform: x64

shallow_clone: true
Expand All @@ -24,6 +26,7 @@ init:
$env:MSVC_VER=1911
$env:ARCHITECTURE="x86"
$env:WIN64_ARG=""
$env:VS_FULL="$env:VS_VERSION"
}
else
{
Expand All @@ -33,6 +36,7 @@ init:
$env:MSVC_VER=1900
$env:ARCHITECTURE="amd64"
$env:WIN64_ARG="WIN64=YES"
$env:VS_FULL="$env:VS_VERSION Win64"
}
function exec
{
Expand Down Expand Up @@ -122,9 +126,30 @@ install:
$env:NMAKE_LOCAL+="NETCDF_LIB=`$(SDK_LIB)\netcdf.lib`n"
$env:NMAKE_LOCAL+="NETCDF_INC_DIR=`$(SDK_INC)`n"
$env:NMAKE_LOCAL+="NETCDF_HAS_NC4 = yes`n"
$env:NMAKE_LOCAL+="PROJ_INCLUDE=-I$env:APPVEYOR_BUILD_FOLDER\install-proj\local\include`n"
$env:NMAKE_LOCAL+="PROJ_LIBRARY=$env:APPVEYOR_BUILD_FOLDER\install-proj\local\lib\proj_6_0.lib`n"
$env:NMAKE_LOCAL | Set-Content "$env:APPVEYOR_BUILD_FOLDER\gdal\nmake.local"
#
cd $env:APPVEYOR_BUILD_FOLDER
exec { git clone --depth=1 https://github.com/OSGeo/proj.4 proj }
cd proj
exec { mkdir build }
cd build
$env:VCPKG_PLATFORM="$env:platform"+"-windows"
exec { vcpkg install sqlite3:$env:VCPKG_PLATFORM }
appveyor DownloadFile https://sqlite.org/2018/sqlite-tools-win32-x86-3250100.zip
exec { 7z x sqlite-tools-win32-x86-3250100.zip }
exec { copy sqlite-tools-win32-x86-3250100/sqlite3.exe . }
$env:PROJ_INSTALL_DIR="$env:APPVEYOR_BUILD_FOLDER"+"\install-proj"
$env:CMAKE_INSTALL_PREFIX="-DCMAKE_INSTALL_PREFIX=" + $env:PROJ_INSTALL_DIR
exec { cmake -G $env:VS_FULL .. $env:CMAKE_INSTALL_PREFIX -DPROJ_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBPROJ_SHARED=ON -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake }
exec { cmake --build . --config Release --target install }
cd $env:APPVEYOR_BUILD_FOLDER\install-proj\share
appveyor DownloadFile https://download.osgeo.org/proj/proj-datumgrid-1.8.zip
exec { 7z x proj-datumgrid-1.8.zip }
#
cd $env:APPVEYOR_BUILD_FOLDER\gdal
exec { copy $env:APPVEYOR_BUILD_FOLDER\install-proj\bin\proj_6_0.dll . }
exec { nmake /f makefile.vc MSVC_VER=$env:MSVC_VER $env:WIN64_ARG USER_DEFS=/WX }
cd apps
exec { nmake /f makefile.vc test_ogrsf.exe MSVC_VER=$env:MSVC_VER $env:WIN64_ARG USER_DEFS=/WX }
Expand All @@ -145,7 +170,7 @@ test_script:
- ps: |
$env:PATH="$env:APPVEYOR_BUILD_FOLDER\gdal;$env:APPVEYOR_BUILD_FOLDER\gdal\apps;$env:SDK_BIN;$env:PATH"
$env:GDAL_DATA="$env:APPVEYOR_BUILD_FOLDER\gdal\data"
$env:PROJ_LIB="$env:SDK_BIN\proj\SHARE"
# $env:PROJ_LIB="$env:APPVEYOR_BUILD_FOLDER\install-proj\share"
$env:DO_NOT_FAIL_ON_RECODE_ERRORS="YES"
# The ca-bundle.crt file which we could point to is invalid in the current SDK
# See https://github.com/gisinternals/buildsystem/issues/104
Expand Down
16 changes: 12 additions & 4 deletions autotest/alg/warp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,15 @@ def test_warp_37():

# Dummy proj.4 method
sr = osr.SpatialReference()
sr.ImportFromProj4('+proj=dummy_method +wktext')
sr.ImportFromWkt("""PROJCS["unnamed",
GEOGCS["unnamed ellipse",
DATUM["unknown",
SPHEROID["unnamed",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["custom_proj4"],
UNIT["Meter",1],
EXTENSION["PROJ4","+proj=dummy_method +units=m +wktext"]]""")
dst_wkt = sr.ExportToWkt()

gdal.PushErrorHandler('CPLQuietErrorHandler')
Expand All @@ -1223,10 +1231,10 @@ def test_warp_37():
gdal.ErrorReset()
assert tmp_ds is None

# Incompatible projection (UTM 40 is on the other side of the earth w.r.t UTM 11)
# Incompatible projection (pseudo-UTM 40 is on the other side of the earth w.r.t UTM 11)
sr = osr.SpatialReference()
# Use inline definition instead of EPSG:32640 so that we don't use etmerc on proj 4.9.3
sr.SetFromUserInput('+proj=tmerc +lat_0=0 +lon_0=57 +k=0.9996 +x_0=500000 +y_0=0 +datum=WGS84 +units=m +no_defs +wktext')
# Use inline definition instead of EPSG:32640 with modified k, so that we don't use etmerc
sr.SetFromUserInput('+proj=tmerc +lat_0=0 +lon_0=57 +k=0.9995 +x_0=500000 +y_0=0 +datum=WGS84 +units=m +no_defs +wktext')
dst_wkt = sr.ExportToWkt()

gdal.PushErrorHandler('CPLQuietErrorHandler')
Expand Down
9 changes: 8 additions & 1 deletion autotest/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CPPFLAGS:=$(filter-out -DGDAL_COMPILATION,$(CPPFLAGS))

CFLAGS += -I. -Itut $(GDAL_INCLUDE)

PROGS = gdal_unit_test testperfcopywords testcopywords testclosedondestroydm testthreadcond testvirtualmem testblockcache testblockcachewrite testblockcachelimits testdestroy testmultithreadedwriting test_include_from_c_file test_include_from_cpp_file test_include_from_cpp_file_with_extern_c
PROGS = gdal_unit_test testperfcopywords testcopywords testclosedondestroydm testthreadcond testvirtualmem testblockcache testblockcachewrite testblockcachelimits testdestroy testmultithreadedwriting test_include_from_c_file test_include_from_cpp_file test_include_from_cpp_file_with_extern_c test_osr_set_proj_search_paths

all: $(PROGS)

Expand All @@ -31,6 +31,7 @@ quick_test: gdal_unit_test testcopywords testclosedondestroydm testthreadcond te
./testblockcachelimits --debug ON
./testmultithreadedwriting
./testdestroy
./test_osr_set_proj_search_paths

test_sse:
$(CXX) -g -O2 testsse.cpp -o testsse -I../../gdal/port -I../../gdal/gcore
Expand Down Expand Up @@ -117,6 +118,12 @@ testblockcachelimits: testblockcachelimits.o
testdestroy: testdestroy.o
$(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@

test_osr_set_proj_search_paths.o: test_osr_set_proj_search_paths.cpp
$(CXX) $(CXXFLAGS) $(PROJ_INCLUDE) $(PROJ_CFLAGS) -c $<

test_osr_set_proj_search_paths: test_osr_set_proj_search_paths.o
$(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@

vsipreload.so: ../../gdal/port/vsipreload.o
$(CXX) -fPIC -g $(CXXFLAGS) $< $(CONFIG_LIBS) $(LDFLAGS) -shared -o $@

Expand Down
2 changes: 1 addition & 1 deletion autotest/cpp/test_alg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ namespace tut
GDALDatasetUniquePtr poDS(
GDALDriver::FromHandle(
GDALGetDriverByName("MEM"))->Create("", 1, 1, 1, GDT_Byte, nullptr));
poDS->SetProjection( SRS_WKT_WGS84);
poDS->SetProjection( SRS_WKT_WGS84_LAT_LONG );
double adfGeoTransform[6] = { 10, 1, 0, 20, 0, -1 };
poDS->SetGeoTransform(adfGeoTransform);
GDALWarpOptions* psOptions = GDALCreateWarpOptions();
Expand Down
13 changes: 8 additions & 5 deletions autotest/cpp/test_gdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ namespace tut
class FakeBand: public GDALRasterBand
{
protected:
virtual CPLErr IReadBlock(int, int, void*) CPL_OVERRIDE { return CE_None; }
virtual CPLErr IWriteBlock( int, int, void * ) CPL_OVERRIDE { return CE_None; }
virtual CPLErr IReadBlock(int, int, void*) override { return CE_None; }
virtual CPLErr IWriteBlock( int, int, void * ) override { return CE_None; }

public:
FakeBand(int nXSize, int nYSize) { nBlockXSize = nXSize;
Expand All @@ -255,15 +255,18 @@ namespace tut
public:
DatasetWithErrorInFlushCache() : bHasFlushCache(false) { }
~DatasetWithErrorInFlushCache() { FlushCache(); }
virtual void FlushCache(void) CPL_OVERRIDE
virtual void FlushCache(void) override
{
if( !bHasFlushCache)
CPLError(CE_Failure, CPLE_AppDefined, "some error");
GDALDataset::FlushCache();
bHasFlushCache = true;
}
virtual CPLErr SetProjection(const char*) CPL_OVERRIDE { return CE_None; }
virtual CPLErr SetGeoTransform(double*) CPL_OVERRIDE { return CE_None; }
virtual CPLErr _SetProjection(const char*) override { return CE_None; }
CPLErr SetSpatialRef(const OGRSpatialReference* poSRS) override {
return OldSetProjectionFromSetSpatialRef(poSRS);
}
virtual CPLErr SetGeoTransform(double*) override { return CE_None; }

static GDALDataset* CreateCopy(const char*, GDALDataset*,
int, char **,
Expand Down
45 changes: 30 additions & 15 deletions autotest/cpp/test_gdal_aaigrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,22 @@ namespace tut
ensure_equals("Projection definition is not available", proj.empty(), false);

std::string expect(
"PROJCS[\"unnamed\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\""
",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],"
"TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwich\",0,"
"AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,"
"AUTHORITY[\"EPSG\",\"9122\"]],"
"AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Albers_Conic_Equal_Area\"],"
"PARAMETER[\"standard_parallel_1\",61.66666666666666],PARAMETER[\"standard_parallel_2\",68],"
"PARAMETER[\"latitude_of_center\",59],PARAMETER[\"longitude_of_center\",-132.5],"
"PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",500000],UNIT[\"METERS\",1]]");
"PROJCS[\"unnamed\",GEOGCS[\"NAD83\","
"DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\","
"6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],"
"AUTHORITY[\"EPSG\",\"6269\"]],"
"PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"
"UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],"
"AUTHORITY[\"EPSG\",\"4269\"]],"
"PROJECTION[\"Albers_Conic_Equal_Area\"],"
"PARAMETER[\"latitude_of_center\",59],"
"PARAMETER[\"longitude_of_center\",-132.5],"
"PARAMETER[\"standard_parallel_1\",61.6666666666667],"
"PARAMETER[\"standard_parallel_2\",68],"
"PARAMETER[\"false_easting\",500000],"
"PARAMETER[\"false_northing\",500000],"
"UNIT[\"METERS\",1],"
"AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]");

ensure_equals("Projection does not match expected", proj, expect);

Expand Down Expand Up @@ -251,12 +258,20 @@ namespace tut
std::string proj(GDALGetProjectionRef(dsDst));
ensure_equals("Projection definition is not available", proj.empty(), false);

std::string expect("PROJCS[\"NAD_1927_UTM_Zone_11N\",GEOGCS[\"GCS_North_American_1927\","
"DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke_1866\",6378206.4,294.9786982]],"
"PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],"
"PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],"
"PARAMETER[\"central_meridian\",-117],PARAMETER[\"scale_factor\",0.9996],"
"PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]");
std::string expect(
"PROJCS[\"NAD27 / UTM zone 11N\",GEOGCS[\"NAD27\","
"DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\","
"6378206.4,294.978698213898,AUTHORITY[\"EPSG\",\"7008\"]],"
"AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0],"
"UNIT[\"Degree\",0.0174532925199433]],"
"PROJECTION[\"Transverse_Mercator\"],"
"PARAMETER[\"latitude_of_origin\",0],"
"PARAMETER[\"central_meridian\",-117],"
"PARAMETER[\"scale_factor\",0.9996],"
"PARAMETER[\"false_easting\",500000],"
"PARAMETER[\"false_northing\",0],"
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],"
"AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]");

ensure_equals("Projection does not match expected", proj, expect);

Expand Down
4 changes: 2 additions & 2 deletions autotest/cpp/test_gdal_dted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ namespace tut
std::string proj(GDALGetProjectionRef(ds));
ensure_equals("Projection definition is not available", proj.empty(), false);

std::string expect("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]");
std::string expect("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]");
ensure_equals("Projection does not match expected", proj, expect);

GDALClose(ds);
Expand Down Expand Up @@ -242,7 +242,7 @@ namespace tut
std::string proj(GDALGetProjectionRef(dsDst));
ensure_equals("Projection definition is not available", proj.empty(), false);

std::string expect("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]");
std::string expect("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]");
ensure_equals("Projection does not match expected", proj, expect);

GDALRasterBandH band = GDALGetRasterBand(dsDst, rasters_.at(fileIdx).band_);
Expand Down
27 changes: 10 additions & 17 deletions autotest/cpp/test_osr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ namespace tut
ensure_equals("OSRSetTOWGS84 failed", err_, OGRERR_NONE);
ensure("GetTOWGS84 result is wrong",
std::equal(coeff, coeff + coeffSize, expect));
OSRSetLinearUnits(srs_, "Metre", 1);

char* proj4 = nullptr;
err_ = OSRExportToProj4(srs_, &proj4);
Expand Down Expand Up @@ -270,18 +271,7 @@ namespace tut
ensure_equals("OSRExportToWkt failed", err_, OGRERR_NONE);
ensure("OSRExportToWkt returned NULL", nullptr != wkt1);

err_ = OSRSetFromUserInput(srs_, "WGS84");
ensure_equals("OSRSetFromUserInput failed", err_, OGRERR_NONE);

char* wkt2 = nullptr;
err_ = OSRExportToWkt(srs_, &wkt2);
ensure_equals("OSRExportToWkt failed", err_, OGRERR_NONE);
ensure("OSRExportToWkt returned NULL", nullptr != wkt2);

ensure_equals("CRS84 lookup not as expected",
std::string(wkt1), std::string(wkt2));
CPLFree(wkt1);
CPLFree(wkt2);
}

// Test URN support for EPSG
Expand Down Expand Up @@ -328,12 +318,14 @@ namespace tut
ensure_equals("OSRExportToWkt failed", err_, OGRERR_NONE);
ensure("OSRExportToWkt returned NULL", nullptr != wkt1);

std::string expect("PROJCS[\"UTM Zone 11, Northern Hemisphere\","
"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\","
"SPHEROID[\"WGS 84\",6378137,298.257223563,"
std::string expect("PROJCS[\"unnamed\",GEOGCS[\"WGS 84\","
"DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\","
"6378137,298.257223563,"
"AUTHORITY[\"EPSG\",\"7030\"]],"
"AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,"
"AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,"
"AUTHORITY[\"EPSG\",\"6326\"]],"
"PRIMEM[\"Greenwich\",0,"
"AUTHORITY[\"EPSG\",\"8901\"]],"
"UNIT[\"degree\",0.0174532925199433,"
"AUTHORITY[\"EPSG\",\"9122\"]],"
"AUTHORITY[\"EPSG\",\"4326\"]],"
"PROJECTION[\"Transverse_Mercator\"],"
Expand All @@ -342,7 +334,8 @@ namespace tut
"PARAMETER[\"scale_factor\",0.9996],"
"PARAMETER[\"false_easting\",500000],"
"PARAMETER[\"false_northing\",0],"
"UNIT[\"Meter\",1,AUTHORITY[\"EPSG\",\"9001\"]]]");
"UNIT[\"Meter\",1,AUTHORITY[\"EPSG\",\"9001\"]],"
"AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]");

ensure_equals("AUTO42001 urn lookup not as expected", std::string(wkt1), expect);
CPLFree(wkt1);
Expand Down
2 changes: 2 additions & 0 deletions autotest/cpp/test_osr_ct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ namespace tut
{
srs_utm_ = OSRNewSpatialReference(nullptr);
srs_ll_ = OSRNewSpatialReference(nullptr);
OSRSetAxisMappingStrategy(srs_utm_, OAMS_TRADITIONAL_GIS_ORDER);
OSRSetAxisMappingStrategy(srs_ll_, OAMS_TRADITIONAL_GIS_ORDER);
}

~test_osr_ct_data()
Expand Down
4 changes: 2 additions & 2 deletions autotest/cpp/test_osr_pci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ namespace tut
{
ensure("SRS handle is NULL", nullptr != srs_);

const char* wkt = "\"\"PROJCS[\"unnamed\",GEOGCS[\"NAD27\","
const char* wkt = "PROJCS[\"unnamed\",GEOGCS[\"NAD27\","
"DATUM[\"North_American_Datum_1927\","
"SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139006,"
"AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],"
Expand All @@ -128,7 +128,7 @@ namespace tut
"PARAMETER[\"latitude_of_origin\",33.76446202777777],"
"PARAMETER[\"central_meridian\",-117.4745428888889],"
"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]]\"\"";
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]]";

err_ = OSRImportFromWkt(srs_, (char**) &wkt);
ensure_equals("Can't import Lambert Conformal Conic projection",
Expand Down
9 changes: 5 additions & 4 deletions autotest/cpp/test_osr_proj4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ namespace tut
: err_(OGRERR_NONE), srs_(nullptr)
{
srs_ = OSRNewSpatialReference(nullptr);
OSRSetAxisMappingStrategy(srs_, OAMS_TRADITIONAL_GIS_ORDER);
}

~test_osr_proj4_data()
Expand All @@ -68,8 +69,8 @@ namespace tut
{
ensure("SRS handle is NULL", nullptr != srs_);

std::string wkt("+proj=tmerc +lat_0=53.5000000000 +lon_0=-8.0000000000"
"+k_0=1.0000350000 +x_0=200000.0000000000 +y_0=250000.0000000000"
std::string wkt("+proj=tmerc +lat_0=53.5000000000 +lon_0=-8.0000000000 "
"+k_0=1.0000350000 +x_0=200000.0000000000 +y_0=250000.0000000000 "
"+a=6377340.189000 +rf=299.324965 +towgs84=482.530,"
"-130.596,564.557,-1.042,-0.214,-0.631,8.15");

Expand All @@ -95,8 +96,8 @@ namespace tut
{
ensure("SRS handle is NULL", nullptr != srs_);

std::string wkt("+proj=lcc +x_0=0.6096012192024384e+06 +y_0=0"
"+lon_0=90dw +lat_0=42dn +lat_1=44d4'n +lat_2=42d44'n"
std::string wkt("+proj=lcc +x_0=0.6096012192024384e+06 +y_0=0 "
"+lon_0=90dw +lat_0=42dn +lat_1=44d4'n +lat_2=42d44'n "
"+a=6378206.400000 +rf=294.978698 +nadgrids=conus,ntv1_can.dat");

err_ = OSRImportFromProj4(srs_, wkt.c_str());
Expand Down
Loading