../loader/NotReallyMultiPoint \
../loader/MultiToSinglePoint \
../loader/ReprojectPts \
+ ../loader/ReprojectPtsD \
../loader/ReprojectPtsGeog \
+ ../loader/ReprojectPtsGeogD \
../loader/Latin1 \
../loader/Latin1-implicit \
../loader/mfile \
--- /dev/null
+-- Cleanup\r
+DELETE FROM spatial_ref_sys;\r
--- /dev/null
+--- In case this test is running in an extension context\r
+TRUNCATE spatial_ref_sys;\r
+---\r
+--- EPSG 4326 : WGS 84\r
+---\r
+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 ');\r
+---\r
+--- EPSG 2260 : NAD83 / New York East (ftUS)\r
+---\r
+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 ');\r
+\r
--- /dev/null
+# This happens to be a multipoint shapefile that has only single points, so use -S.
+# It is in NJ State Plane NAD83, so reproject to 4326 using copy mode
+-D -S -s 2260:4326
--- /dev/null
+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)
--- /dev/null
+select ST_Asewkt(ST_SnapToGrid(the_geom,0.00000001)) from loadedshp;\r
+\r
--- /dev/null
+-- cleanup\r
+DELETE FROM spatial_ref_sys;\r
--- /dev/null
+---\r
+--- EPSG 4326 : WGS 84\r
+---\r
+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 ');\r
+---\r
+--- EPSG 2260 : NAD83 / New York East (ftUS)\r
+---\r
+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 ');\r
+\r
--- /dev/null
+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)
--- /dev/null
+# This happens to be a multipoint shapefile that has only single points, so use -S.
+# It is in NJ State Plane NAD83, using the -D copy mode, -s reproject to 4326, -G flag cast a geography.
+-D -S -s 2260:4326 -G
--- /dev/null
+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)
--- /dev/null
+select ST_Asewkt(ST_SnapToGrid(the_geom::geometry,0.00000001)) from loadedshp;\r
+\r