From bc3a4a4f5a3f78312f4aa6e61f29decf4aef1a16 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Mon, 29 Jul 2019 01:11:07 +0000 Subject: [PATCH] Add regression tests for using -s from_srid:to_srid with -D (copy mode) for both geometry and geography Closes #4403 git-svn-id: http://svn.osgeo.org/postgis/trunk@17624 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/core/Makefile.in | 2 + regress/loader/ReprojectPtsD-post.sql | 2 + regress/loader/ReprojectPtsD-pre.sql | 11 +++ regress/loader/ReprojectPtsD.dbf | Bin 0 -> 100 bytes regress/loader/ReprojectPtsD.opts | 3 + regress/loader/ReprojectPtsD.select.expected | 66 ++++++++++++++++++ regress/loader/ReprojectPtsD.select.sql | 2 + regress/loader/ReprojectPtsD.shp | Bin 0 -> 4324 bytes regress/loader/ReprojectPtsD.shx | Bin 0 -> 628 bytes regress/loader/ReprojectPtsGeogD-post.sql | 2 + regress/loader/ReprojectPtsGeogD-pre.sql | 9 +++ .../ReprojectPtsGeogD-w.select.expected | 66 ++++++++++++++++++ regress/loader/ReprojectPtsGeogD.dbf | Bin 0 -> 100 bytes regress/loader/ReprojectPtsGeogD.opts | 3 + .../loader/ReprojectPtsGeogD.select.expected | 66 ++++++++++++++++++ regress/loader/ReprojectPtsGeogD.select.sql | 2 + regress/loader/ReprojectPtsGeogD.shp | Bin 0 -> 4324 bytes regress/loader/ReprojectPtsGeogD.shx | Bin 0 -> 628 bytes 18 files changed, 234 insertions(+) create mode 100644 regress/loader/ReprojectPtsD-post.sql create mode 100644 regress/loader/ReprojectPtsD-pre.sql create mode 100644 regress/loader/ReprojectPtsD.dbf create mode 100644 regress/loader/ReprojectPtsD.opts create mode 100644 regress/loader/ReprojectPtsD.select.expected create mode 100644 regress/loader/ReprojectPtsD.select.sql create mode 100644 regress/loader/ReprojectPtsD.shp create mode 100644 regress/loader/ReprojectPtsD.shx create mode 100644 regress/loader/ReprojectPtsGeogD-post.sql create mode 100644 regress/loader/ReprojectPtsGeogD-pre.sql create mode 100644 regress/loader/ReprojectPtsGeogD-w.select.expected create mode 100644 regress/loader/ReprojectPtsGeogD.dbf create mode 100644 regress/loader/ReprojectPtsGeogD.opts create mode 100644 regress/loader/ReprojectPtsGeogD.select.expected create mode 100644 regress/loader/ReprojectPtsGeogD.select.sql create mode 100644 regress/loader/ReprojectPtsGeogD.shp create mode 100644 regress/loader/ReprojectPtsGeogD.shx diff --git a/regress/core/Makefile.in b/regress/core/Makefile.in index d1fe0efd7..ad61bf0f5 100644 --- a/regress/core/Makefile.in +++ b/regress/core/Makefile.in @@ -61,7 +61,9 @@ TESTS = \ ../loader/NotReallyMultiPoint \ ../loader/MultiToSinglePoint \ ../loader/ReprojectPts \ + ../loader/ReprojectPtsD \ ../loader/ReprojectPtsGeog \ + ../loader/ReprojectPtsGeogD \ ../loader/Latin1 \ ../loader/Latin1-implicit \ ../loader/mfile \ diff --git a/regress/loader/ReprojectPtsD-post.sql b/regress/loader/ReprojectPtsD-post.sql new file mode 100644 index 000000000..4d480c650 --- /dev/null +++ b/regress/loader/ReprojectPtsD-post.sql @@ -0,0 +1,2 @@ +-- Cleanup +DELETE FROM spatial_ref_sys; diff --git a/regress/loader/ReprojectPtsD-pre.sql b/regress/loader/ReprojectPtsD-pre.sql new file mode 100644 index 000000000..4e642fb96 --- /dev/null +++ b/regress/loader/ReprojectPtsD-pre.sql @@ -0,0 +1,11 @@ +--- In case this test is running in an extension context +TRUNCATE spatial_ref_sys; +--- +--- EPSG 4326 : WGS 84 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4326,'EPSG',4326,'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.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]','+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '); +--- +--- EPSG 2260 : NAD83 / New York East (ftUS) +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2260,'EPSG',2260,'PROJCS["NAD83 / New York East (ftUS)",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.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",492125],PARAMETER["false_northing",0],AUTHORITY["EPSG","2260"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); + diff --git a/regress/loader/ReprojectPtsD.dbf b/regress/loader/ReprojectPtsD.dbf new file mode 100644 index 0000000000000000000000000000000000000000..cfaee4bf1f5d8bff0e1f627fc791a19b59289c47 GIT binary patch literal 100 acmZS1XBKo~U|>*WU<8twfLDQHAO!$+fnG9{pfmZs)Wsh}YueZMw8XZ(!(_j&KW_L$$!E{~Iw!`Oq`L=JX%MQPB)SVKp8CzfT^`K3cldg~GA4(tkdFFKO96^uekH$_sgXFP> z`P+sS?9v`u+;T^3oH{FiE%@c4)0eEY`_S$Wr!Lb8w|H!v_?`U!{OYw2zxMByeHPop z_oB9Vybq@*lwaQF@^2?H(bcq4N;CNpZt>VSJ*j*{QStFzdxPk+*je}XW!VY0cx;@y zDDOS!=kysNt=!9E5Hcl?etFs&trZ4U}%tW}wW8)-8_u%~Y_8I&2?^z}q zd+^49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#$Eg$14#F)S8>a!vSGvVlrBw#dd+UeK+;%dYuRk8$;<0gxSH9@9_nEBQ zI*re}Rov=j5N`3Y*q4rLjooS^( IxW!}p4-ScbBLDyZ literal 0 HcmV?d00001 diff --git a/regress/loader/ReprojectPtsD.shx b/regress/loader/ReprojectPtsD.shx new file mode 100644 index 0000000000000000000000000000000000000000..59f0cb91370a41d607691be2b879bfacf098c5cc GIT binary patch literal 628 zcmZw8F=|3V5XSNKy=Wd!EF7>)7ecU|(n5H(-H3?S*eeJgU@sBGDtmym7U}jB7O~kA zYzCF4lsIh8_b(Oqh!=f{KP714c}k oi(^4WLyrL?Cd|c&prWD2fDses;;W#dp~rv`6Xs$gsAv!W0lDZm3;+NC literal 0 HcmV?d00001 diff --git a/regress/loader/ReprojectPtsGeogD-post.sql b/regress/loader/ReprojectPtsGeogD-post.sql new file mode 100644 index 000000000..b188c1aaf --- /dev/null +++ b/regress/loader/ReprojectPtsGeogD-post.sql @@ -0,0 +1,2 @@ +-- cleanup +DELETE FROM spatial_ref_sys; diff --git a/regress/loader/ReprojectPtsGeogD-pre.sql b/regress/loader/ReprojectPtsGeogD-pre.sql new file mode 100644 index 000000000..8ae5d8e84 --- /dev/null +++ b/regress/loader/ReprojectPtsGeogD-pre.sql @@ -0,0 +1,9 @@ +--- +--- EPSG 4326 : WGS 84 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4326,'EPSG',4326,'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.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]','+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '); +--- +--- EPSG 2260 : NAD83 / New York East (ftUS) +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2260,'EPSG',2260,'PROJCS["NAD83 / New York East (ftUS)",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.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",492125],PARAMETER["false_northing",0],AUTHORITY["EPSG","2260"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); + diff --git a/regress/loader/ReprojectPtsGeogD-w.select.expected b/regress/loader/ReprojectPtsGeogD-w.select.expected new file mode 100644 index 000000000..a0d541410 --- /dev/null +++ b/regress/loader/ReprojectPtsGeogD-w.select.expected @@ -0,0 +1,66 @@ +SRID=4326;POINT(-74.17782492 41.08263361) +SRID=4326;POINT(-74.44881286 40.50133744) +SRID=4326;POINT(-74.00376358 40.28149688) +SRID=4326;POINT(-75.12863742 39.7797389) +SRID=4326;POINT(-74.57629014 40.85597595) +SRID=4326;POINT(-74.47160401 40.52369066) +SRID=4326;POINT(-75.46891683 39.69688334) +SRID=4326;POINT(-75.11458618 39.70739231) +SRID=4326;POINT(-74.22643701 40.09726563) +SRID=4326;POINT(-74.26766926 40.83522615) +SRID=4326;POINT(-74.42152037 40.76232181) +SRID=4326;POINT(-74.18666598 40.89980341) +SRID=4326;POINT(-74.20201874 40.94448827) +SRID=4326;POINT(-74.31866663 40.6680465) +SRID=4326;POINT(-74.83205963 40.84912898) +SRID=4326;POINT(-74.64402101 39.96633708) +SRID=4326;POINT(-74.22194028 40.09559148) +SRID=4326;POINT(-74.60375255 40.75504208) +SRID=4326;POINT(-74.09376018 40.86569336) +SRID=4326;POINT(-74.4430374 40.77797967) +SRID=4326;POINT(-74.76841703 40.22038455) +SRID=4326;POINT(-74.19078182 40.73914574) +SRID=4326;POINT(-74.19628444 40.79591416) +SRID=4326;POINT(-74.19130306 40.74330253) +SRID=4326;POINT(-74.17636308 40.73783123) +SRID=4326;POINT(-74.53148731 39.49029456) +SRID=4326;POINT(-74.16618054 40.73634864) +SRID=4326;POINT(-74.35732607 40.80076793) +SRID=4326;POINT(-74.17573811 40.73901418) +SRID=4326;POINT(-74.66491581 40.34572735) +SRID=4326;POINT(-74.36625323 40.51061374) +SRID=4326;POINT(-74.17631876 40.74329159) +SRID=4326;POINT(-74.4544664 40.52427239) +SRID=4326;POINT(-74.02836656 40.89756584) +SRID=4326;POINT(-75.00833975 39.82895026) +SRID=4326;POINT(-74.13132221 40.33161528) +SRID=4326;POINT(-74.67999522 39.46203859) +SRID=4326;POINT(-74.08904806 40.9515804) +SRID=4326;POINT(-75.12091068 39.94826917) +SRID=4326;POINT(-74.08628025 40.70929009) +SRID=4326;POINT(-74.73270242 40.27825159) +SRID=4326;POINT(-74.16625303 40.01000431) +SRID=4326;POINT(-75.01837982 40.74472398) +SRID=4326;POINT(-74.65920653 40.34951097) +SRID=4326;POINT(-74.24751143 40.74434122) +SRID=4326;POINT(-74.65122484 40.25151634) +SRID=4326;POINT(-74.43880205 40.4659008) +SRID=4326;POINT(-74.2355417 40.68231466) +SRID=4326;POINT(-74.49892935 40.80763833) +SRID=4326;POINT(-74.0625762 40.73086062) +SRID=4326;POINT(-75.03600164 39.78659251) +SRID=4326;POINT(-75.05591643 39.44084942) +SRID=4326;POINT(-74.39804333 40.50086907) +SRID=4326;POINT(-74.07131567 40.72720191) +SRID=4326;POINT(-74.19117919 40.74196293) +SRID=4326;POINT(-74.02494262 40.74676479) +SRID=4326;POINT(-74.68894668 40.6094749) +SRID=4326;POINT(-74.44600226 40.49825884) +SRID=4326;POINT(-74.19898991 40.85779571) +SRID=4326;POINT(-74.7828046 40.27094999) +SRID=4326;POINT(-74.25017536 40.217432) +SRID=4326;POINT(-74.16960551 40.91844326) +SRID=4326;POINT(-74.75788852 41.06754763) +SRID=4326;POINT(-74.03363729 40.72689071) +SRID=4326;POINT(-74.5760699 40.53743164) +SRID=4326;POINT(-74.43925667 40.77359187) diff --git a/regress/loader/ReprojectPtsGeogD.dbf b/regress/loader/ReprojectPtsGeogD.dbf new file mode 100644 index 0000000000000000000000000000000000000000..cfaee4bf1f5d8bff0e1f627fc791a19b59289c47 GIT binary patch literal 100 acmZS1XBKo~U|>*WU<8twfLDQHAO!$+fnG9{pfmZs)Wsh}YueZMw8XZ(!(_j&KW_L$$!E{~Iw!`Oq`L=JX%MQPB)SVKp8CzfT^`K3cldg~GA4(tkdFFKO96^uekH$_sgXFP> z`P+sS?9v`u+;T^3oH{FiE%@c4)0eEY`_S$Wr!Lb8w|H!v_?`U!{OYw2zxMByeHPop z_oB9Vybq@*lwaQF@^2?H(bcq4N;CNpZt>VSJ*j*{QStFzdxPk+*je}XW!VY0cx;@y zDDOS!=kysNt=!9E5Hcl?etFs&trZ4U}%tW}wW8)-8_u%~Y_8I&2?^z}q zd+^49_)HVw7LSdSoAQUVSc`NVZH7UU{ z)1OLa_wvo3ZYSL0u}M;X`-B~H_7++wF(PbQ?;Zh!TRb*SzRJg*tcjeFs?o8k^po+v zL4;d8HcnlYAN}^eiU~u5sCII+`|@OiaEr&r$)xa$eRgZ}(b*aEr&r$?u`R@Y$Wj`2qB2vX+usZ>2)m4?Hxs-IU)mK74BM zdW|Am{`fVihe5c-W8?I+^6L`&AKX~XpTCO>i_V=e2)B4_ocxvd%vkaJjZ%$LUOl`Z zs;@z~#be_XpnSgVa(=>ojY4uOukU=;Al%}yaSBx4eO29%l10H3U9aEl65~m@#be`S zQU3n9rbAQfHEQt;Z!8Ws2)B4_VwE3t^u5U=<7||1^B;3flR>z}W8)O8e81z}zb`+a z(Fz}b?n?pe10u4_oofw^T#b78z)Wq(6Rf^#?@M>PgKIhEk||2Egl;uUHLb^ z?ie$)L#J`I?|UC>wi9mg*yJIV?_0a|e8X5ja(N};o6zuXgj+l|PGQQ&E*n=??$BxF zz3peal-UTkcx;>u<=YQ54axXBkQyV}+FP1E2)B4_ob1Xsm-{Ts&eG}WNvT(x@*IR) zJT^`aVSMJV6p z-Gyzgra;4yYe9>=12m8^* zTa&Ys2O5N1JT^|xD!<7$FVFG1g^YQn>0g}U{~uwC$Hpm2`9CIu_I@cb~sEgl=Ep32{u?m5TL%Sw$e#jUp7GzhnNY@D7`zR+a8>e2%Tk6URpKLJGPd@u+9gg)Q+~ToudS3bFw1)I|=9(W~3*i=z zjZ=*BD=c;Ca}I{k;Ix@XB0kXxw|H!vUQqsxv>Dn({@!ly>2!X!w?VkYW8)O7{9OC0 z+i~kOGQX8xp3>VO+~Tou>aG0sH@|Ciato#0l7Xu?3^53|cx;^Fl)vQH(pvjVAYEH~ zCA*+HlyHm3#;K3;k&Rncn47IsG|qX^#w9x87LSe7i^_j|bU->@#x08OYDSO zJT^{!m5(|d+V+0$09sr#IdRIJ5W+1U8>fEC@0z|gx!Tak)BI6I(jhD17LScnf8`@u zU1q!1XtaJ#$Eg$14#F)S8>a!vSGvVlrBw#dd+UeK+;%dYuRk8$;<0gxSH9@9_nEBQ zI*re}Rov=j5N`3Y*q4rLjooS^( IxW!}p4-ScbBLDyZ literal 0 HcmV?d00001 diff --git a/regress/loader/ReprojectPtsGeogD.shx b/regress/loader/ReprojectPtsGeogD.shx new file mode 100644 index 0000000000000000000000000000000000000000..59f0cb91370a41d607691be2b879bfacf098c5cc GIT binary patch literal 628 zcmZw8F=|3V5XSNKy=Wd!EF7>)7ecU|(n5H(-H3?S*eeJgU@sBGDtmym7U}jB7O~kA zYzCF4lsIh8_b(Oqh!=f{KP714c}k oi(^4WLyrL?Cd|c&prWD2fDses;;W#dp~rv`6Xs$gsAv!W0lDZm3;+NC literal 0 HcmV?d00001 -- 2.50.1